Question: (Data structure homework,use java) Use arrays to implement a classes GraduateList. The list will have the following attributes: String Student[MAX], static int totalGrads, double score[MAX],
(Data structure homework,use java)
Use arrays to implement a classes GraduateList. The list will have the following attributes: String Student[MAX], static int totalGrads, double score[MAX], static double AvgScores where MAX=1000. The GraduateList will be sorted according to the StudentNumber. Define the following methods for the GraduateList Class
1. AddGraduate() method to add students to the sortedList, this method will increase total students, and generate a random score value between 50 and 100, and then compute the averageScore.
2. GraduateList CopyList() method to create a copy of GraduateList object. This will return a reference to GraduateList Object.
3. int GetGraduate(String name) to find the index number of the student whose studentNumber is passed
4. PrintList() to print the entire list
5. RemoveGraduate(String name) that will call getGraduate() method to find the index, decrement the totalGrads, remove an item stored at the same index in both Students[] and Scores[] lists and recompute the AvgScore.
6. ClearList() will delete all entries
7. IsEmpty() will return if the graduateList is empty
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
