Question
TO DO: You will be provided with a text file that has a list of ratings (values between 1 and 10) with multiple values on
TO DO: You will be provided with a text file that has a list of ratings (values between 1 and 10) with multiple values on a line and multiple lines. For your testing, just create one with numbers of your choice. You need to write a program named Distribution.java that will read in the data and return a frequency distribution and an average value for the data. NOTE: you must let the user choose the file from a FileDialog box. Do not hard code the path location!
For instance, if the file had the following
1 6 8 7
2 5 8 9 9
3 4
2 3 9 9 8 8 7
10 1 10 10
3
Your program should return
The following is the distribution of values:
1 - 2
2 - 2
3 - 3
4 - 1
5 - 1
6 - 1
7 - 2
8 - 4
9 - 4
10 - 3
The average value was 6.17
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