Question: / / The Homework 6 class that implements sorting and heap methods / / your name here public class Homework { / / student comparison
The Homework class that implements sorting and heap methods
your name here
public class Homework
student comparison
public int comparesStudent s Student s
TODO: implement this method
return ; replace this statement with your own return
This is the wrapper method for quick sort
Do not make any changes to this method!
public void quickSortStudent studentArray
quickSortRecstudentArray studentArray.length ;
This is the recursive helper method for quickSort that sorts the students based on their GPAs in
increasing order.
Note: If two students have the same GPA, then the one with lower student ID should show up in front of
the one with higher ID
public void quickSortRecStudent studentArray, int first, int last
TODO: implement this method
This method splits a Student array into two sections, with all the elements less than the pivot in the
left section and all the elements greater than the pivot in the right section
public int splitStudent studentArray, int first, int last
TODO: implement this method
return ; replace this statement with your own return
This method takes an int array which represents a complete binary tree as
the parameter. It checks if the tree stored in the array is a heap.
public boolean isHeapint A
TODO: implement this method
return false; replace this statement with your own return
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
