The class has the following contructors and methods:
* A default constructor that sets the rational numbers to 0/1
* A constructor that has parameters for the numerator and denominator and converts the resulting ratio to simplified form.
* simplify--a private method that converts the rational numbers to simplified form.
* geGCD (x, y )--a private static method that returns the largest common factor of the two positive integers x and y, that is, their greatest common divisor. For example, the greatest common divisor of 40 and 12 is 4.
* getValue--returns the rational number as a double value.
* toString--returns the rational number as a string in the form a/b.
Unfortunately, your question requires a lot of work and cannot be done for free.
Submit it with all requirements as an assignment to our control panel and we'll assist you.
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF