Assignment Operator Overloading
Assignment Operator Overloading
Operator Overloading
Q1. Write a class Circle with a private member variable radius. Write function
Area that returns the area of the circle and a function Circumference that returns
the circumference of the circle.
Overload the following operators:
+ (plus) operator to add two Circle objects
> (greater than) operator to compare two Circles as to which is bigger (or smaller).
== to check whether two circles are the same or not
>> to input the circle
<< to display the circle
Q2. Write a class Triangle with a private member variables side1, side2 and side3.
Write Perimeter and Area functions that returns the perimeter and area of the
triangle.