Question: java program that calculate average grade of a class. A user enters every grade through keyboard, and your program will calculate average of a class.

java program that calculate average grade of a class. A user enters every grade through keyboard, and your program will calculate average of a class. The program will stop adding grade, when a user type -1. And then, the program will display the average of a class on the screen. 1. Declare variable names and data type of each variable. (10) 2. Import scanner class for user input. (5) 3. Add every grade entered by a user using do/while loop. 4. Calculate the average of the class. 5. Display average of the class on the screen. 6. Control the first input that is -1(Hint: use selection structure (if-else) to handle it).

7. Your output should look like following: ************************************ Enter grade, -1 to end: 100 Enter grade, -1 to end: 90.5 Enter grade, -1 to end: 80.3 Enter grade, -1 to end: 70.6 Enter grade, -1 to end: 60.8 Enter grade, -1 to end: -1 Class Average: 80.44 ************************************ ************************************ Enter grade, -1 to end: -1 No data entered! Program is terminated!! ************************************

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!