Write a compareTo method for a Student class that uses two i…
Write a compareTo method for a Student class that uses two instance variables to determine order: gpa (double) and studentID (int). The ordering of Student established by this class is: Order first by gpa, in descending order (highest GPA first). Order second by studentID, in ascending order. If both variables are the same between the instances, the students are equal. You do not have to add the code for the instance variables. Canvas Tip for all Qs: Click on the dropdown that says “Paragraph” and switch to “Preformatted” to get a monospaced font – this can help in coding answers