Question: 1 0 . 1 0 ( Rationa 1 Nu 1 1 1 ber Clms ) Crcace a RationalNumber ( fracrions ) class like chc: one

10.10(Rationa1Nu111ber Clms) Crcace a RationalNumber(fracrions) class like chc: one in Exercise 9.6,
Provide che following capabilities:
a} Create a constructor that prc:vents a O denominator in a fr:iction, reduces or simplifies fractions that are not in reduced form and avoids negative denominators.
b) Overload the addition, subtraction, multiplication and division operators for this class. c} Overload the relational and equality operators for this class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!