* Sort Student array descending based on GPA using MERGE sort.Sorting will be done in place.
*
* @param students array to be sorted, can be empty, but cannotbe null
*/
public static void sortGPA(Student[] students)
{
// TODO: implement this
}
Student class:
public class Student extends Person { private double GPA; public Student(String lastName, String firstName, double gpa) { super(lastName, firstName); this.GPA = gpa; } public double getGPA() { return GPA; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } Student student = (Student) o; return Double.compare(student.GPA, GPA) == 0; } @Override public String toString() { return \"Student{\" + super.toString() + \";\" + \"GPA=\" + GPA + '}'; }}