- 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...


- 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.



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here