2. **The Problem (an enhanced version of Chapter 11, Programming Problem 3, page 659):** design, implement, and test a Rational class that represents a rational number as a pair of integers instead of a single floating-point number.
3. **More Details:**
A rational number is a number that can be expressed as a fraction whose numerator and denominator are integers. Examples of rational numbers are 0.75 (which is 3/4) and 1.125 (which is 9/8). The value p is not a rational number; it cannot be expressed as the ratio of two integers.
1. The *Rational* objects must be stored in their reduced form. In other words, the rational number 12/16 should be stored as 3/4. A private member function Reduce should be provided to reduce the *Rational* object.
2. The *Rational* class should have two class constructors. The first one lets the client specify an initial numerator and denominator. The other??"the default constructor??"creates the *Rational* number 0, represented as a numerator of 0 and a denominator of 1.
3. The *Rational* class should have arithmetic operations that add, subtract, multiply, and divide two *Rational* objects. These should be implemented as value-returning functions, each returning a *Rational* object.
4. The *Rational* class should have a Boolean operation that compares two *Rational* objects for equality.
5. The *Rational* class should have an input operation that reads a rational number from a designated input stream in the form numerator/denominator.
6. The *Rational* class should have an output operation that writes a rational number out to a designated output stream in the form numerator/denominator
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
I use Microsoft Visual Studio C++ to do all my work. The source file has to be in .cpp format.