Question: Hey guys. I have a lab that I cannot solve. Please help me! It will be in my final grade. Operator Overloading-completing the rational class
Hey guys. I have a lab that I cannot solve. Please help me! It will be in my final grade.
Operator Overloading-completing the rational class
here is the example link from my instructor: http://www.csit.parkland.edu/~kurban/permanent/sample-files/rationalLab/
Here are the labs' handouts:

My exa eis at http: www.csit parkland, edul-kurbanlpemanentsample filesrationalLau Operator Overloading completing the rational class Rational Numbers Rational numbers are the ratio of two integers. The integers are called m Numerator and m Denominato Rational numbers are to be always kept in reduced form with the sign in the numerator. I have provided a function called "reduce() which does this It calls another function called gcd() which helps by finding the greatest common divisor of the numerator and denominator, This does not need to be be changed Because of this, we will never set the numerator and denominator directly. We will be able to access the values, Methods you need to implement: Constructors default constructor should set the value to 01 single int constructor should set the value to n 1 where n is the argumen double int constructor should sct the value to nid where m is the first parameter and d is the second Notice the constructors might nccd to rcducc thc fraction Methods you need to implement: Math operators Rational operator Rational, Rational which multiplies two rational numbers This is written for you Rational operator (Rational, Rational) which divides two rational numbers Rational operator (Rational, Rational) which adds two rational numbers Rational operator (Rational, Rational) which subtracts two rational numbers These need to use the non-member farm as shown in rational h Methods you need to implement: comparisons bool operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
