Question: import java.util.*; import java.io.File; import java.io.FileNotFoundException; public class SortedBarChart { /** * Read a sequence of positive integers from a given input file, * and
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]030], and save them in a new array list. To do so, you must find th e maximum value in the list first, say max. The remaining values should be computed based on the the formula: value * 30/max, where value is the original value. . Print out the bar values 5. Print out the bar charts with the bar values 6. Sort the bar values using Collections.sortO 7. Print out the sorted bar chart Three sample input files are given to you. A sample output corresponding to input1.txt is shown in Figure 1 2 Requirements of the program: 1. You should implement methods for this program. If you implement everyt hing within main), you will lose 30 points 2. You may use the template file I provide to you. If you write on your own, you should provide similar methods as in the template file 3. Your program should prompt user to enter input file name. While only three input files are given, your program should accept other input file 4. Your program output should be neat, icluding labeling and spaces (See Figure 1) 5. Your program should have good style (indentation, whitespace, comments, vertical alignmen, ..)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
