Question: Problem Description This problem is to develop a simple application to compute the statistics of homework grades. The application should prompt the user to enter

Problem Description

This problem is to develop a simple application to compute the statistics of homework grades. The application should prompt the user to enter the total number of the scores of an assignment, and prompt the user to enter all of the scores. After reading in all those scores, the application should product the following statistics about the assignment.

1)The average score

2)The highest score

3)The lowest score

Here is a sample run:

Enter the number of scores: 5

Enter 5 scores: 67.50 94.80 88.50 76.90 99.00

The average score is 85.34

The highest score is 99.00

The lowest score is 67.50

Assignment Requirements

The following specific requirements must be met:

1) Create a method to read the scores and return the scores in a one dimensional array to the caller.

2) Create a method to calculate the average score of those scores passed into the method in a one dimensional array parameter and return the calculated average score to the caller.

3) Create a method to determine the highest score among those scores passed into the method in a one dimensional array parameter and return the highest score to the caller.

4) Create a method to determine the lowest score among those scores passed into the method in a one dimensional array parameter and return the lowest score to the caller.

5) The main method of the program must receive user input, call those methods to obtain the required data, and finally display the information.

6) You should choose descriptive names for those methods and follow Java naming convention.

7) Each method must perform appropriate data validation on the parameters passed to the method if any.

8) You may choose to use either the console or the Java dialog boxes for data input and output.

9) If the number of scores is zero or a negative score is entered, your program should report the error and terminate the execution.

10) All numeric output data must be properly formatted to keep only two digits after the decimal point.

Perform the following test cases:

Scores

Average

Highest

Lowest

Test run 1

67.50 94.80 0.00 88.50 76.90 99.00

71.12

99.00

0.00

Test run 2

60.7 80.0 77.6 98.6 96.5 100 89.3

86.10

100.00

60.70

Test run 3

89.20 78.00 -60.00 99.50

Report an data error and terminate the execution

N/A

N/A

N/A

Test run 4

The number of scores is entered as a zero

Report that no report can be produced

N/A

N/A

N/A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!