Question: www wwwwww Write a program called Grades Record, which reads in n grades (of int between 0 and 100, inclusive) and displays the average,

www wwwwww Write a program called Grades Record, which reads in n

 

www wwwwww Write a program called Grades Record, which reads in n grades (of int between 0 and 100, inclusive) and displays the average, minimum, and maximum. Your program shall check for valid input. < Hints: public class Grades Record{ wwwwwwwwww public static int[] grades; // Declare an int[], to be allocated later T // main() method public static void main(String[] args) { readGrades(); < System.out.println("The average is " + average()); < System.out.println("The minimum is " + min()); < System.out.println("The maximum is " + max()); < } f // Prompt user for the number of students and allocate the "grades" array. < // Then, prompt user for grade, check for valid grade, and store in "grades". < public static void readGrades() { .......} < // Return the average value of int[] grades < public static double average() { . } // Return the maximum value of int[] grades < public static int max() { ......} < L // Return the minimum value of int[] grades < public static int min() { } 222 Output L Enter the number of students: 4+ Enter the grade for student 1: 50- Enter the grade for student 2: 51- Enter the grade for student 3:56- Enter the grade for student 4: 53- The average in 52.5- The minimum is 50 The maximum in 50

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!