Define a rational number class. A rational number is a numbercomposed of two int
ID: 3611498 • Letter: D
Question
Define a rational number class. A rational number is a numbercomposed of two integers with division indicated as in 1/2, 2/3,4/5. A rational number is defined using two integer objects, anumerator and a denominator. Overload the << and >>operators as well as each of the arithmetic operators to performthe following operations:a/b + c/d = (a*d + b*c) //addition
a/b - c/d = (a*d - b*c) //subtraction
(a/b) * (c/d) = (a*c) / (b*d) //multiplication
(a/b) / (c/d) = (a*d) / (c*b) //division
Thanks for all the help!