A RATIONAL NUMBER IS A QUOTIENT OF TWO INTEGERS.

FOR EXAMPLE, 12/5, 12/4, 3/4, AND 4/6 ARE ALL RATIONAL NUMBERS.

A RATIONAL NUMBER IS SAID TO BE IN REDUCED FORM IF ITS DENOMINATOR IS POSITIVE AND ITS NUMERATOR AND DENOMINATOR HAVE NO COMMON DIVISOR OTHER THAN 1. FOR EXAMPLE, THE REDUCED FORMS OF THE RATIONAL NUMBERS GIVEN ABOVE ARE 12/5, 3/1, 3/4, AND 2/3. WRITE A CLASS CALLED RATIONAL WITH A CONSTRUCTOR RATIONAL(INT, INT) THAT TAKES TWO INTEGERS, A NUMERATOR AND A DENOMINATOR, AND STORES THOSE TWO VALUES IN REDUCED FORM IN CORRESPONDING PRIVATE MEMBERS. THE CLASS SHOULD HAVE A PRIVATE MEMBER FUNCTION VOID REDUCE() THAT IS USED TO ACCOMPLISH THE TRANSFORMATION TO REDUCED FORM. THE CLASS SHOULD HAVE AN OVERLOADED INSERTION OPERATOR << THAT WILL BE USED FOR OUTPUT OF OBJECTS OF THE CLASS.

Academic Honesty!

It is not our intention to break the school's academic policy. Projects posted are only used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.

Kindly fill out the form.
Please provide a valid email address and we'll get back to you in less than 24 hours.
We will be sending an invoice through PayPal upon confirmation.
We are a non profit organization however we need an amount to keep this organization running,
and to be able to complete our research and development.