Lab Assignment
(4 May, 2020- 9 May, 2020)
Operator Overloading
Define a class ratio with numerator and denominator as member variables.
Write the constructors, destructors and copy constructor. Overload the
following operators for the same:
• Arithmetic operators: +, -, *, /
• Relational operators: <=, >=, ==, !=
• Assignment operator: =
• Arithmetic assignment operator: +=, -=
• Pre and post increment operators: ++
• Stream input and output operators: << and >>