Question: JAVA Write a program that calculates the class average. The program will ask a user to input the number of students and input each grade

JAVA

Write a program that calculates the class average.

The program will ask a user to input the number of students and input each grade of students. Then, the program calculates the average of the class and select highest and lowest grade of the class. Your program should meet the following requirements:

1. You must use a single-dimensional array.

2. Define three static methods - one for getting the highest score, one for getting the lowest score, the other for calculating the average.

3. Array size should be determined by user input (number of students).

4.Ask a user to input each grade of students (use for loop).

5. All grades you input should be double data types and must be saved in an array.

6. The average of the class should have two decimal places.

Your result should be similar to the following:

JAVA Write a program that calculates the class average. The program will

C.S. C:\Windows\system32\cmd.exe How many students do you have? 5 student 1 grade : 55.5 student 2 grade : 69.7 student 3 grade: 100 student 4 grade: 95.3 student 5 grade : 88.8 Highest grade: 100.0 Lowest grade: 55.5 Class Average: 81.86

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!