Page 1 of 1

Your task is to create a class called fraction. This class will have two integer data members namely numerator and denom

Posted: Sat Jul 09, 2022 11:48 am
by answerhappygod
Your Task Is To Create A Class Called Fraction This Class Will Have Two Integer Data Members Namely Numerator And Denom 1
Your Task Is To Create A Class Called Fraction This Class Will Have Two Integer Data Members Namely Numerator And Denom 1 (72.69 KiB) Viewed 34 times
Your task is to create a class called fraction. This class will have two integer data members namely numerator and denominator. To make the task simple suppose that all fractions have the same denominator i.e. 5. Follow the requirements given below: • Create a fraction object called sum that will hold the sum of two fractions by using the operator. • Create a fraction object called difference that will hold the difference of two fractions by using the operator . Create a fraction object called multiple that will hold the product of any two fractions by using the * operator • Overload the + operator so that it works with a fraction class object. • Overload the operator so that it works with a fraction class object. . Overload the operator so that it works with a fraction class object. In the end create a display function through which you can display your fractions.