$24
Description
You are to write a program to compute statistics on a list of exam scores, the Exam Statistics Program (ESP). The input is the name of a text file that contains the number of scores followed by the list of scores. (See the example below.) You should then display the following information:
The number of scores
The minimum, maximum, and average scores
The number of As, Bs, Cs, Ds, and Fs, using a 90-80-70-60 scale.
For full credit, you must use at least one function/method, and you must use an array to store the list of exam scores.
Sample Run
Below is an example of what your program may look like. It does not have to be identical. The user's input appears in italics (purple).
***Welcome to the Exam Statistics Program!!***
Please enter the name of your data file: esp.txt
Minimum score: 72
Maximum score: 92
Average score: 82.5
Number of scores by letter grade:
A: 1
B: 3
C: 2
D: 0
F: 0
There are 6 scores.
Here is the sample input file esp.txt:
6
88
77
92
82
84
72
Hand In
Turn in a listing (print-out) of your program and the print-out of a sample run.
Extra Credit (2 points)
For 2 points of extra credit, compute the median score in addition to what the program already does. To compute the median, sort the scores, and the score in the middle is the median. If there are an even number of scores, average the two scores in the middle to obtain the median. So, in the sample score list above, the median would be 83.0.
Notes
Don't forget to write comments (javadoc compatible), and remember to indent properly.
Do this project in phases: first just get the data to read from the file, then do the easy statistics first (min, max, avg) and save the number of each letter grade for last.
Your program should handle any number of scores (no upper limit). You may assume all scores are 0-100.
Do not try the extra credit until after you have completed the basic assignment.
Start early!