Question: PART A - LinkedLists ( 5 5 marks ) When a student wishes to register for a course, they are placed on a waitlist if

PART A - LinkedLists (55 marks)
When a student wishes to register for a course, they are placed on a waitlist if the class is already full.
Students can register from the waitlist when a spot become available and if they have permission. In our
simplified simulation of a waitlist, the system randomly performs one of four operations and updates the
waitlist accordingly. For simplicity, we assume that:
- only one operation can be performed in a day;
- a waitlisted student has a maximum of two days to complete their registration once they are
permitted to register. If not registered after two days, the student becomes the last person on
the list, in order to give other students a chance;
- only one student (first person on the list) can be granted permission to register at any point.
- A waitlisted student is a student with a waitlist status (Waitlisted or PermittedToRegister) and
may have some number of days left to complete registration if they have been permitted to
register.
The details of each operation and the rules applying are provided below:

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!