Question: Modify the RationalNumber class so that it implements the Comparable interface. To perform the comparison, compute an equivalent floating point value from the numerator and
Modify the RationalNumber class so that it implements the Comparable interface. To perform the comparison, compute an equivalent floating point value from the numerator and denominator for both RationalNumber objects, then compare them using a tolerance value of The name of the new class is RationalNumber You can use the RationalTester driver class to test your work.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
