# Module 17: Operator Overloading

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
[https://teamacademy.help.center/article/1350-module-18-inheritance] to learn
about different types of inheritance, virtual base classes, abstract base
classes and constructors and destructors in derived classes.