C++ Tutorial: Some Lab assignments on Operator Overloading

Question:Write a class to store x, y, and z coordinates of a point in three-dimensional space. Using operator overloading, write friend functions to add, and subtract the vectors.

Question:Compare the two object that contains integer values that demonstrate the overloading of equality (= =), less than (<), greater than (>), not equal (!=),greater than or equal to (>=) and less than or equal to(<=) operators.


Question: Write a class Date that uses pre increment and post increment operators to add 1 to the day in the Date object, while causing appropriate increments to the month and year. (use the appropriate condition for leap year). The increment operators in your Date class should behave exactly as the built in increment operators.


SHARE C++ Tutorial: Some Lab assignments on Operator Overloading

You may also like...

1 Response

  1. Thanks for sharing this information.

Leave a Reply

Your email address will not be published. Required fields are marked *