Create a class Rational for performing arithmetic with fractions. Write a driver program to test the class. Provide a constructor that enables an object of this class to be initialized when it is instantiated. The constructor should contain default values in case no initializes are provided and should store the fraction in reduced form.Provide a private function to reduce numbers.Provide Public member functions for each of the following arithmatic’s functions (addition –subtraction –multiplication –division), printing in the form a/b, printing in floating point format and final overload the == and != operators to allow comparisons of two fraction numbers.Include any additional operations that you think would be useful for a rational number class.Design,implement, and test your class.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here