Question: Write a class encapsulating the concept of student grades on a test, assuming student grades are composed of a list of integers between 0 and

Write a class encapsulating the concept of student grades on a test, assuming student grades are composed of a list of integers between 0 and 100. Write the following methods: //1.A constructor with just one parameter, the number of students; all grades can be randomly generated. //2.Accessor, mutator methods 3.A method returning an array of grades sorted in ascending order 4.A method returning the highest grade 5.A method returning the average grade 6.A method returning the median grade (Hint: The median grade will be located in the middle of the sorted array of grades 7.A method returning the mode (the grade that occurs most often.

Hint: Create an array of counters; count how many times each grade occurs; then pick the maximum in the array of counters; the array index is the mode.

Write a client class to test all of the methods in your class.

Sample output shoudl look like this: any help would be awesome!

Write a class encapsulating the concept of student grades on a test,

El Console Problems Javadoc Declaration Kterminated GradesClient [Java cational CAI Files Javal Program re g1 Grades 14 36 25 93 71 30 88 100 93 5 92 g2: 52 61 86 35 62 73 14 71 66 82 47 objects are not equal Setting gl and g2 arrays to studentGrades Grades: 56 97 85 78 97 88 98 97 62 75 75 Comparing g1 and g2 for equality objects are equal Sorted grades: 56 62 75 75 78 85 88 97 97 97 98 The highest grade is 98 The average grade is 82.55 The median grade is 85 The mode is 97

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!