Question: first picture is the project question and the second picture are the requirements please follow those carefully in terms of the output. comments on the

Programming Projects 1. Write a class called Rational Number that represents a fraction with an integer numerator and denominator. A Rational Number object should have the following methods: public RationalNumber(int numerator, int denominator) Constructs a new rational number to represent the ratio (numerator/denominator). The denominator cannot be e, so throw an IllegalArgumentException if o is passed. public RationalNumber() Constructs a new rational number to represent the ratio (0/1). public int get Denominator() Returns this rational number's denominator value; for example, if the ratio is (3/5), returns 5. public int getNumerator) Returns this rational number's numerator value; for example, if the ratio is (3/5), returns 3. public String toString() Returns a string representation of this rational number, such as "375". You may wish to omit denominators of 1, returning "4" instead of 14/1" An extra challenge would be to maintain your RationalNumber objects in reduced form, avoiding rational numbers such as 3/6 in favor of 1/2, or avoiding 2/-3 in favor of -2/3. Another possible extra feature would be methods to add, subtract, multiply, and divide two rational numbers. Due Thursday 1/7 pg. 584 for online textbook page 914 #1 Need toString method, 2 constructors Don't forget to write the client program that makes two fractions and then Adds, Subtracts, Divides, and Multiply them. Must maintain the fraction in reduced form. The client program must prompt the user for two fraction, must add, subtract, divide, and multiply the two fraction, must output the results. Ex: The sum of 1/3+4/5 = 17/15 or the sum of 1/4+1/4 = 1/2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
