1.This is an extension to an earlier lab involving a grade reporting system. Write a program that prompts the user to enter the number of students and the number of grades per student. Then

i.Dynamically allocate the space for the two dimensional double array

ii.compute the average, maximum and minimum of each set of student grades

iii.compute the average, maximum and minimum of all the values

iv.report the results

You will need a driver that continuously re-prompts the user for new sets of data. You must modify the functions you wrote in an earlier lab to compute the average of an input array of doubles and the one to compute the maximum and minimum. Recall that the original average function accepted the array as input parameter and returned a double that is the average. The max/min function had a return type of class MaxMin which contained the calculated maximum and minimum grade. It accepted the one dimensional array as input parameter. Since you are now tasked to compute the average, maximum and minimum of the entire class, you must write an additional average and max/min method that can accept as input a two dimensional array of doubles. Any other aspects of the new methods remain as is. The basic average, maximum and minimum finding algorithms are essentially unchanged, except that all work is done inside nested loops instead of a single loop. The driver calls the proper functions with the correct parameters for average, maximum and minimum calculations and is responsible for displaying results. I/O function calls should only appear in the driver.

Keep in mind these other general rules of good program construction:

i.Use static final constants to represent the key parameters of the problem.

ii.Use final to ensure that the compiler guards against changes being made to constants and/or method arguments that should remain immutable.

iii.All constants, variables and functions should have names that describe their intent.

iv.Write efficient functions, that is, functions that require as little memory and operations as possible and are general enough for a wide variety of uses.

v.Add comments and good formatting for readability.

Your output should faithfully reproduce all of formatting nuances shown in the sample output below; however, be sure to test your application with different values.

How many students are in your class? -- 3

How many grades are there per student in your class? -- 5

Plz enter the grades for student #0
100
97
87
87
92
The average grade for student #0 is 92.6
The maximum grade for student #0 is 100
The minimum grade for student #0 is 87

Plz enter the grades for student #1
85
77
68
74
87
The average grade for student #1 is 78.2
The maximum grade for student #1 is 87
The minimum grade for student #1 is 68

Plz enter the grades for student #2
90
85
65
50
0
The average grade for student #2 is 58.0
The maximum grade for student #2 is 90
The minimum grade for student #2 is 0

The class average grade is 76.3
The class maximum grade is 100
The class minimum grade is 0

Do you wish to continue (Y/N) - y

How many students are in your class? -- 2

How many grades are there per student in your class? -– 3

Plz enter the grades for student #0
100
90
90
The average grade for student #0 is 93.3
The maximum grade for student #0 is 100
The minimum grade for student #0 is 90

Plz enter the grades for student #1
100
90
0
The average grade for student #1 is 63.3
The maximum grade for student #1 is 100
The minimum grade for student #1 is 0

The class average grade is 78.3
The class maximum grade is 100
The class minimum grade is 0

Do you wish to continue (Y/N) - n
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.