Description of this paper

Create a Java application that contains methods to display statistics for the numbers in an array.

Description

solution


Question

Name the Java Class: ArrayStatistics;Create a Java application that contains methods to display statistics for the numbers in an array.;The main method has been written and it?s attached. complete the program by writing the following methods.;fillArray Method: Read the grades from a file named ExamScores.txt. The first number in the file is the number of exams follows by the exam scores. Create an array of the size indicated and fill it with exam scores from the file. After the exams are loaded, sort the array. Return the array to the calling method.;displayGrades Method: Receive the array as an argument and display the count for each letter grade (A, B, C, D, F). Letter grades are determined as follows;Score Letter Grade;90-100 A;80-89 B;70-79 C;60-69 D;Below 60 F;frequencyChart Method: Receive the array as an argument and display a frequency chart for each exam score in the array. Display an asterisk for each distinct score found.;getMode Method: Receive the array as an argument and return the mode. If there are duplicate numbers for the mode, simply return the first number.;getAverage Method: Receive the array as an argument and return the average of exam scores found in the array.;getStandardDeviation: Receive the array and the average as arguments and return the standard deviation. Use the formula for standard deviation shown in exercise 7.11 on page 278 of the text.;*if you use any variables give them long, meaningful descriptive names.;*use descriptive comments to explain what you do;Program output should look like this;There are 32 exam scores;Frequency Chart;62 **;66 *;68 *;70 *;71 *;72 *;75 **;77 ***;80 *;83 *;85 ***;86 *;87 ***;88 *;89 **;90 *;91 *;94 ****;95 *;96 *;Mode 94;Average 82.21875;Standard Deviation 10.02;Letter Grade Summary;A 8;B 12;C 8;D 4;F 0

 

Paper#64629 | Written in 18-Jul-2015

Price : $21
SiteLock