Midterm Exam Extra Credit

You can earn a few points of extra credit by writing the following code including a reasonable test platform. For the students that did very well in the exam, the most points you can earn is half the difference between your grade and a perfect score. You might find the exercise useful anyway.

Write a static method that returns the index of the largest Object in an array of Objects with the help of a Comparator. Test this out using the ACCComparator that was described on the test. For testing purposes you also need to create an ACCSchools class and array(s) of ACCSchools. However, it must be able to function with any array of objects and associated comparator. For example, I might test it with an array of Students with a Comparator that I provide.

The header of your method is:

static int maxLoc(Object[] m, Comparator c) {