Question: 1 Description of the program In this assignment, you will write a Java program to do the followings: 1. Read a sequence of values from

 1 Description of the program In this assignment, you will write
a Java program to do the followings: 1. Read a sequence of
values from a file into an array list. 2. Print out the
original list values. 3. Convert the original list values into bar values

1 Description of the program In this assignment, you will write a Java program to do the followings: 1. Read a sequence of values from a file into an array list. 2. Print out the original list values. 3. Convert the original list values into bar values within the range of [0, 30), and save them in a new array list. To do so, you must find the maximum value in the list first, say max. The remaining values should be computed based on the the formula: value 30/maa, where value is the original value. 4. Print out the bar values. 5. Print out the bar charts with the bar valtves. 6. Sort the bar values using Collections.sort ) 7. Print out the sorted bar chart Undo Cut Copy Paste Find... Close public static ArrayList readValues(String fileName) throws FileNotFound ArrayListInteger list ArrayListIntegers(); = new return list; * Return the largest element in the array list. * Oparam list: the input list * ereturn the largest element in list public static int findMax(ArrayList list) int max-0; return max; *Convert the list valeus into corresponding bar values proportion to the largest * Truncate the fraction part if the resulting bar value is not a whole number * eparam list the input list x/ public static Arraylist convertBarValues (ArrayList list) ayListInteger newlist = new ArrayListIntegers(); return newList; public static void main(String[] args)

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!