Module Overview
This module introduces operator overloading in C++ programming and explains how operators can be customised to work with user-defined data types.
Learners will explore the overloading of unary and binary operators and understand how operator overloading allows operators to perform specific operations with objects.
The module also covers operator overloading using friend functions, helping learners understand how operators can be implemented to support object-based operations in C++.
What Will Be Covered
17.1 Overloading Unary and Binary Operators
Understand how unary and binary operators can be overloaded in C++. Learn how operators can be redefined to perform specific operations on user-defined objects and how operator overloading helps make object-based expressions more intuitive.
17.2 Overloading Using Friend Function
Explore how friend functions are used to implement operator overloading in C++. Understand how friend functions can access class members and how they can be used to define the behaviour of overloaded operators.
Skills You Will Gain
Understanding operator overloading in C++.
Overloading unary operators.
Overloading binary operators.
Working with operators and user-defined objects.
Implementing operator overloading using friend functions.
Understanding how overloaded operators support object-based operations.
Learning Outcomes
By the end of this module, learners will be able to:
Explain the concept and purpose of operator overloading.
Implement unary operator overloading.
Implement binary operator overloading.
Understand how overloaded operators work with objects.
Use friend functions to implement operator overloading.
Apply operator overloading in C++ programming.
Certification Alignment
This module develops object-oriented programming concepts that support the implementation of custom operations on user-defined data types. The concepts covered contribute to the C++ programming knowledge developed throughout the C and C++ training curriculum.
Continue to the Next Module
Continue to Module 18: Inheritance to learn about different types of inheritance, virtual base classes, abstract base classes and constructors and destructors in derived classes.
Still need help?
Contact us