Question: Java STUDENT.JAVA public class Student { private final String name; private final int id; public Student(String name, int id) { this.name = name; this.id =

Java

Java STUDENT.JAVA public class Student { private final String name; private final

STUDENT.JAVA

public class Student { private final String name; private final int id; public Student(String name, int id) { this.name = name; this.id = id; } public String getName() { return name; } public int getId() { return id; } }

public void registerStudent (Student student) { // TODO: Implement. The student should be registered, but not enrolled in the class or added to the waitlist. } public void enrollStudent(int id) { // TODO: Implement. The student with the provided ID should be added the enrolled students set if there is // capacity. If there is not, but there is capacity in the waitlist, the student should be added to that // instead. If there is no capacity in the enrollment set or the waitlist, the request can be ignored. } public void dropStudent(int id) { // TODO: Implement. Attempt to remove the student with the provided ID from the enrolled students set. If the student was removed, backfill the enrolled students set with a student from the waitlist. } public ArrayList getEnrolledstudents() { // TODO: Implement. Return the names of all students that are enrolled in an ArrayList. return new ArrayList(); public void registerStudent (Student student) { // TODO: Implement. The student should be registered, but not enrolled in the class or added to the waitlist. } public void enrollStudent(int id) { // TODO: Implement. The student with the provided ID should be added the enrolled students set if there is // capacity. If there is not, but there is capacity in the waitlist, the student should be added to that // instead. If there is no capacity in the enrollment set or the waitlist, the request can be ignored. } public void dropStudent(int id) { // TODO: Implement. Attempt to remove the student with the provided ID from the enrolled students set. If the student was removed, backfill the enrolled students set with a student from the waitlist. } public ArrayList getEnrolledstudents() { // TODO: Implement. Return the names of all students that are enrolled in an ArrayList. return new ArrayList()

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!