Question: Student - ID: int - name: String - major: String + Student (ID: int, name: String, major: string) // setters getters + toString): Strin Employee

 Student - ID: int - name: String - major: String +Student (ID: int, name: String, major: string) // setters getters + toString):

Student - ID: int - name: String - major: String + Student (ID: int, name: String, major: string) // setters getters + toString): Strin Employee name : String id: int Employee(name : String, id : int) // setters getters toString): Strin Registrar - students: LinkedList +Registrar () +addEmployee (employee: Employee) + removeEmployees): void + addStudent(student : Student): void + deletestudent(ID : int) : void + getAllComputerScience) : LinkedList + getAllMath0 : LinkedList + getAllBioInformatics() : LinkedList + hasStudent(name: String) : Boolean -register (name : String) : void + printStudents () : void You have to implement the previous three classes. The class Student has three private variables, a constructor, setters and getters, and a toString method. The class Employee has two private variables, a constructor, setters and getters, and a toString method. The class Registrar has a LinkedList of students, a linked list of employees, methods th LinkedLists at apply operations on the addEmployee( employee: Employee): Inserts the specific employee at the beginning of the list removeEmployees0: Removes all elements from employees list - addStudent (student : Student): takes a student as parameter and adds it to students - deleteStudent (ID: int): deletes a student from Students with the specified name getAllComputerScience 0: returns a LinkedList that contains all the students that have a major of computer science - getAllMath: returns LinkedList that contains all the students that have a major of Math - getAllBioInformatics O:returns LinkedList that contains all the students that have a major of Bioinformatics hasStudent(name : String): returns true if the student with the specified name is found in students; else, it returns false and calls register (name) - register(name : String): generates an ID, and adds the student to the students list and prints "registering student: "ID"+name - printStudents0: prints the students in students list In the tester class, you are required to create an object of type Registrar and add to its lists a number of students and employees. You should add each new employee to the beginning of the list. You should retrieve all students that are of computer science major and print them, retrieve all students that are of math major and print them, and retrieve all students that are of bioinformatics major and print them. You should test the deleteStudent method and print the students list after deletion Test the hasStudent method and verify that it is calling the register method if the student is not found in the list. Finally, remove all employees and hire new employees

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!