$14
Objectives
Activities
You have been hired by a restaurant to create a program that manages reservations. The program should use a priority queue to keep track of customers in order of their reservation time. Each customer has a unique name. The customer also has reservation time, represented as a string in the format of HH:MM. For example, 09:25 has a higher priority than 10:30. The time is from 00:00 until 23:59. So 16:30 is 4:30pm. The program should have a menu-based interface (provided) that allows the user to choose from the six options listed below:
Submitting
You should submit the following files:
Requirements
Examples
An example of how the program should work starts on the following page.
Welcome to the Restaurant Reservation System! |
============================================== |
Please select an option: |
1 |
. Add a customer to the waitlist |
2 |
. Seat the next customer |
3 |
. Change the time of a customer's reservation |
4 |
. Peek at the next customer |
5 |
. Print the reservation list |
6 |
. Quit |
Enter your choice (1-5): 1 |
************************************************* |
Enter the customer's name: Ana |
Enter the time of the reservation (HH:MM): 12:30 |
Ana has been added to the waitlist at 12:30 |
Enter your choice (1-5): 1 |
************************************************* |
Enter the customer's name: Mike |
Enter the time of the reservation (HH:MM): 18:45 |
Mike has been added to the waitlist at 18:45 |
Enter your choice (1-5): 1 |
************************************************* |
Enter the customer's name: James |
Enter the time of the reservation (HH:MM): 02:00 |
James has been added to the waitlist at 02:00 |
Enter your choice (1-5): 4 |
************************************************* |
The next customer on the waitlist is: James, reservation time: 02:00 |
Enter your choice (1-5): 5 |
************************************************* |
__________________________________________________ |
The next customer on the waitlist is: James, time: 02:00 |
The next customer on the waitlist is: Ana, time: 12:30 |
The next customer on the waitlist is: Mike, time: 18:45 |
__________________________________________________ |
Enter your choice (1-5): 2 |
************************************************* |
Seated customer: James, reservation time: 02:00 |
Enter your choice (1-5): 2 |
************************************************* |
Seated customer: Ana, reservation time: 12:30 |
Enter your choice (1-5): 3 |
************************************************* |
Enter the customer's name: Mike |
Enter the new time of the reservation (HH:MM): 10:23 |
Mike's reservation time has been changed to 10:23 |
Enter your choice (1-5): 6 |
************************************************* |
Thank you for using the Restaurant Reservation System! |