2076 2

CSC166 ยท 2076 ยท 10 marks

Explain the concept of operator overloading? List the operators that cannot be overloaded. Write programs to add two object of distance class with data members feet and inch by using member function and friend function.

Explain the concept of operator overloading? List the operators that cannot be overloaded. Write programs to add two object of distance class with data members feet and inch by using member function and friend function.[10]

Object Oriented ProgrammingChapter 4: Operator OverloadingFundamental of operator overloading

--- Operator overloading is a compile-time polymorphism feature in C++ that allows the programmer to redefine or extend the meaning of built-in operators (such as +, -, , ==, etc.) for user-defined data types (classes/objects). When an operator is overloaded, it performs a different operation dep...