Question: Task 3. Add Queue. Add a waiting list to your Cruise Ship class version. Modify your 'A: Add' and 'D: Delete' as follows: When

Task 3. Add Queue. Add a waiting list to your Cruise Ship class version. Modify your 'A: Add' and 'D: Delete' as follows: When you press 'A' to add a new customer, the customer should be added to the Waiting List queue if the Cruise Ship is full. When you press 'D' to delete a customer from a cabin, the next customer in the Waiting List queue should be automatically placed in the cabin. Extra marks will be awarded if you implement the waiting list queue as a circular queue.
Step by Step Solution
There are 3 Steps involved in it
Heres the complete updated CruiseShip class with the Queue class and the required modifications class Customer def initself name selfname name class Cabin def initself selfcustomer None selfisempty Tr... View full answer
Get step-by-step solutions from verified subject matter experts
