Program: 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 subsequent 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.)
- 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.)
Prepare a client class to test all the methods in your class. Make sure to add comments. Comments should be included in the program to explain your calculations and program.