Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started