Question: Write a C++ program and algorithm to create a class of fraction having variables numerator and denominator, and member functions setting and getting values of

Write a C++ program and algorithm to create a class of fraction having variables

numerator and denominator, and member functions setting and getting values of the fractions.

Also create a static member variable of the class having fraction value tolerance of 0.1.

Instantiate 10 fraction objects and find out how many of them are below and above tolerance

level. Decrement the tolerance to 0.01 by a static member function and find out how many of

them are now above and below the new tolerance level

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!