Question: 3. (1.5 points) Write a program that reads a data file containing rational numbers, one per line, stores the numbers in an ArrayList, removes any

 3. (1.5 points) Write a program that reads a data file

3. (1.5 points) Write a program that reads a data file containing rational numbers, one per line, stores the numbers in an ArrayList, removes any duplicates, and then outputs the sum. Note: use BigRational from java.math package and follow the following class outline: class Rational Number Tester__ public static void main (String [] args) throws FileNat ExundException private static BigRational sum(Arrannhist list); private static void printList/Arrannhist list); private static bazlean listContains-Armanist list, RigRational item); } 3. (1.5 points) Write a program that reads a data file containing rational numbers, one per line, stores the numbers in an ArrayList, removes any duplicates, and then outputs the sum. Note: use BigRational from java.math package and follow the following class outline: class Rational Number Tester__ public static void main (String [] args) throws FileNat ExundException private static BigRational sum(Arrannhist list); private static void printList/Arrannhist list); private static bazlean listContains-Armanist list, RigRational item); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!