Input consists of integers representing the numerator and


Please help in JAVA:

You will get input from a file called H8.in.

Input consists of integers representing the numerator and denominator of fractions.

NOTE that some numerators and some denominators will be negative.

As you input 2 integers create a Fraction object. Output the Fraction. (I want to see that your gcd method is working even for negative numbers).

I DO NOT want to see any negative denominators. If both numerator and denominator are negative make both positive, if the denominator is negative but the numerator is positive then flip those signs so that the numerator is negative and the denominator positive. This is so that you so not output 3/-4, but rather -3/4.

DO NOT store these Fractions in any data structure (such as an array or ArrayList). Just keep track of the biggest and the smallest.

At the end of your program output the biggest and the smallest.

You will need to alter your Fraction class to include a compareTo method, and you will need to consider carefully how you know one fraction is less than another.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Input consists of integers representing the numerator and
Reference No:- TGS02889469

Expected delivery within 24 Hours