Question: Language: C++ Make a class with two variables num and denom. Also make a two-argument constructor that initializes the num and denom to the values

Language: C++ Make a class with two variables num and denom. Also make a two-argument constructor that initializes the num and denom to the values sent from calling function. This constructor should prevent a 0 to be the value of denom, reduce or simplify fractions that are not in reduced form, and avoid negative values of denom.

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!