• Get and Set methods for each data member • A display function to display the rational number • Overload the following operators: +, - , * to allow addition, subtraction and multiplication of rational numbers. (You do not need to simplify the number). • Provide an operator ~ to invert the rational number, i.e. p/q should become q/p; • Overload the prefix increment (++) and decrement (--) operators. These operators should increment (decrement) the numerator of the rational number. • Your program should allow statements like: Rational a, b, c(2,3), d(5,8); c = a + b; d=~c; a = ++ c; b = -- d;
In main print your complete name, Reg #, Class section