Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a program in Java with the following requirements: Using a Scanner read the data from the input3.txt file into an array Calculate the average
Create a program in Java with the following requirements:
- Using a Scanner read the data from the input3.txt file into an array
- Calculate the average of these 50 numbers
- Output the numbers 5 to a line. If the number being output is larger than the average output a > character next to it
- Calculate how many times each number appears in the input file (how many 0s, how many 1s, )
- Output the number of times each value appears as a simple graph. Output the number and the a * for each time it appeared in the input file on the same line. For example, if zero appeared in the file 7 times, the line for zero would look like:
- 0 = *******
The text file "input3.txt" contains the following 50 random integers in the range from 0 to 9:
5
8
8
1
5
0
6
6
5
3
4
0
6
8
5
4
9
5
8
0
4
7
4
2
0
9
8
3
5
5
5
7
5
7
1
4
4
0
7
4
8
4
2
4
9
8
8
2
3
4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started