Problem 1 (25 points) The Registrar's office is asked to generate several reports for enrolled students at the Universit

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Problem 1 (25 points) The Registrar's office is asked to generate several reports for enrolled students at the Universit

Post by answerhappygod »

Problem 1 25 Points The Registrar S Office Is Asked To Generate Several Reports For Enrolled Students At The Universit 1
Problem 1 25 Points The Registrar S Office Is Asked To Generate Several Reports For Enrolled Students At The Universit 1 (127.37 KiB) Viewed 15 times
Problem 1 (25 points) The Registrar's office is asked to generate several reports for enrolled students at the University. These reports are to list the student's name and id number (separated with a */) along with their Major, Gpa, and projected graduation year (classof). Part 1 Create a class called Student to hold individual Student information that includes: name - (String) - the full name of the student id (int) - The student id major - (String) - The major of the student gpa (double) - The grade point average of the student classOf (int) - Projjected graduation year Add getters and setters for the 5 members of the class. The President asks for a report of all students and he wants it sorted by 2 criteria: Major and Gpa. Specifically, he says 'please sort it by descending Gpa within Major'. Note that this is a tiered sort with 2 criteria. So all of the students with the same major are together in the sorted list. Within the groups of students for a specific major ((i.e. CS, TSM, etc), that group is sorted by descending Gpa. You can start with the Selection Sort code provided in Selection.java. However, your task is to craft a compareTo() method that will properly sort the students by the double criteria. Remember, you are only allowed a single compareTo so you will have to figure out how to look at both at once to determine ordering! Also, write a toString() method to return a string of the form: (major : gpa : classOf: name/id) Note that we are printing the two fields on which we are sorting at the beginning of the line so the President can easily see the groups of students and their ranking within the major! Implement this class and use the provided UseStudent.java to test your compareTo() method.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply