Question: C++ Define a class for a type called Fraction. This class is used to represent a ratio of two integers. nclude tow mutator functions that

C++
 C++ Define a class for a type called Fraction. This class

Define a class for a type called Fraction. This class is used to represent a ratio of two integers. nclude tow mutator functions that allow the user to set the numerator and the denominator. Also include a member function that returns the value of the numerator divided by the denominator as a double. Use a constructor with defaults of your choosing. The program must validate the denominator so that it is not a zero. Also, the program should run in a loop. Don't forget to validate data and add comments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!