Question: Problem 2: Write a C++ program and algorithm to create a class of fraction having static variables numerator and denominator, and public member functions setting

Problem 2: Write a C++ program and algorithm to create a class of fraction having static variables numerator and denominator, and public member functions setting and getting values of the fractions. Generate random values of 100 fraction objects between values 1 to 1000. Create a static member variable of the class having fraction value tolerance of 0.1. Find out how many of the 100 fractions are below and above tolerance level. Decrement the tolerance to 0.01 by a static member function and find out how many of the same fractions are now above and below the new tolerance level. (Marks 10)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
