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

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:
• A constructor with just one parameter, the number of students; all grades can be randomly generated.
• Accessor, mutator, toString, and equals methods.
• A method returning an array of the grades sorted in ascending order.
• A method returning the highest grade.
• A method returning the average grade.
• A method returning the median grade(Hint: The median grade will be located in the middle of the sorted array of grades.)
Write a client class to test all the methods in your class.
Powered by