Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, you will write a Java program to do the followings: 1. Read a sequence of values from a le into an array

In this assignment, you will write a Java program to do the followings:
1. Read a sequence of values from a le 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 nd the maximum value in the list rst, say max. The remaining values should be computed based on the the formula:value30=max, where value is the original value.
4. Print out the bar values.
5. Print out the bar charts with the bar values.
6. Sort the bar values usingCollections.sort().
7. Print out the sorted bar chart.Three sample input files are given to you. A sample output corresponding toinput1.txt is shown in Figure.
Requirements of the program:
1. You should implement methods for this program. If you implement everything withinmain(), you will lose 30 points.
3. Your program should prompt user to enter input le name. While only three input files are given, your program should accept other input file.
4. Your program output should be neat, including labeling and spaces .
5. Your program should have good style (indentation, whitespace, comments, verticalalignment, ...).
Input1.txt
20 30 40 50 25 90 65 input2.txt
200 300 400 500 250 900 650
input3.txt
2000 3000 4000 5000 2500 9000 6500
image text in transcribed
image text in transcribed
43 Bluet Terminal Window-Prog 1-ArrayApp-Bar...- Options Enter your input file name: input1.txt Original Values: 283 4 50 25 90 65 Bar Values: 6 10 13 16 8 38 21 Bar Visualization: 6) (10) x*(13) (16) 8) (30) *(21) Sorted Bar Values: 6 8 18 13 16 21 3 Sorted Bar Visualization: 6) 8) (10) (13) (16) (21) (30) Figy EmailSaveu utput

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions