Define a class called FractionType to represent numerator and denominator of a fraction. The class should have mutator,
Posted: Fri May 20, 2022 1:32 pm
Define a class called FractionType to represent
numerator and denominator of a fraction. The class should have
mutator, accessor, and default constructor functions. Also, include
the member function definitions listed
below: (40pts)
A public member function called print that takes no
parameters. The member function must print data values in the form
of a fraction.
A public member function called validate with no
parameters. The member function check if the denominator is not a
zero. The member function should return true if the
denominator is a zero, otherwise, it should
return false.
numerator and denominator of a fraction. The class should have
mutator, accessor, and default constructor functions. Also, include
the member function definitions listed
below: (40pts)
A public member function called print that takes no
parameters. The member function must print data values in the form
of a fraction.
A public member function called validate with no
parameters. The member function check if the denominator is not a
zero. The member function should return true if the
denominator is a zero, otherwise, it should
return false.