[url removed, login to view] This lab will construct a class for the arithmetic manipulation of common fractions, i.e., rational numbers. A rational number is a number that can be expressed as a fraction whose numerator and denominator are integers. Of course, computers usually work with numbers in floating point form, rather than rational form. One very good reason for this is that some numbers cannot be expressed as rational numbers, for example the well-known constant pi, which is approximately 3.14159265358979. Nevertheless, we sometimes find that we get imprecise results with floating point numbers. For example, 1.0 / 3.0 * 3.0 often doesn’t give us the answer 1.0, but something like .999999. Problem Statement Our client would like to be able to do arithmetic with rational numbers, so we need to develop a program to accommodate that desire ( because the client is ALWAYS right, as long as he/she is the person paying for the job). Develop a class called ‘rational’. Each object of type ‘rational’ should contain at least the following: a. two private integer data members representing the numerator and denominator of a rational number. b. a public member function that will allow any function to retrieve the numerator, using an integer return value. c. a public member function that will allow any function to retrieve the denominator, using an integer return value. d. a constructor that accepts the numerator and denominator values as arguments. ETC. See text file for whole lab.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
C++ [url removed, login to view] complier