Define a class Student whose instances store the identification number, name, and grade point average for a student. This class should define the methods equals and compareTo, basing a comparison on...


Define a class Student whose instances store the identification number, name, and grade point average for a student. This class should define the methods equals and compareTo, basing a comparison on identification numbers.  Modify one sorting method and one searching method to process an array of Student objects. Create an array of Student objects having unique identification numbers.


a. Sort the array according to identification numbers, using your selected algorithm, and display the results.


b. Search either the original unsorted array or the sorted array for each student, given an identification number.


c. Search for each student, given a name. You will need another search method that does not use Student’s equals and compareTo methods.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here