Question: In Java programming language, how would you write this code? Write a program that gets a list of grades from the user and counts the

In Java programming language, how would you write this code?  In Java programming language, how would you write this code? Write

Write a program that gets a list of grades from the user and counts the number of grades above the average grade. Begin your program by asking the user to enter the number of grades. Store this value in a variable called numOfGrades. If the number is a negative number or zero, you program should print some message and stop. Next, create an array of size numOfGrades. Then you will read numOfGrades values representing student grades from the keyboard and place them into the array. Next, find the average grade of all the values entered, and print this value to the screen. Finally, count the grades that are above the average grade. Display each individual grade that is above the average grade, and display the count of such grades. For example: Please enter the number of grades: 4 Enter a grade: 80 Enter a grade: 65 Enter a grade: 78 Enter a grade: 90 The average grade is: 78.25 The grades above the average grade are: 80 90 for a total of 2 grades

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!