Write a program that gets ints from a file these are


Please help in Java:

You are to write a program that gets ints from a file. These are numerators and denominators, and you are to create Fractions. The input file will contain 20 ints, 2 ints per line, the numerator and denominator of one Fraction. Put these Fractions into an array. Output the array.

For example, if I make the following statement in main Fraction f=new Fraction (20, 25); the constructor should call gcd(20, 25), which returns

The constructor then makes the numerator 4 (=20/5) and the denominator 5 (=25/5). Yes, this is integer division, but we don't worry about it because the greatest common divisor by definition divides both integers with no remainder.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a program that gets ints from a file these are
Reference No:- TGS02889339

Expected delivery within 24 Hours