PLEASE USE C/C++.DONOT USE PYTHON Using linked lists implement an amusement park reservation system. The system allows a person to make a reservation for a specific date. A person can change the...




PLEASE USE C/C++.DONOT USE PYTHON




Using linked lists implement an amusement park reservation system. The system allows a person to make  a reservation for a specific date. A person can change the reservation date or even cancel his booking anytime.


The system puts all reservations in a queue. The park will allow only certain number of persons on any given day in order the reservation was made. For each day the system will print out persons allowed to visit the park.


For sake of simplicity, dates are being confined to 15th
to 30th. The system should ask the user to enter code for different operations. It reads all data from the datafile
amusement.dat.


The first integer on datafile indicates limit of persons allowed on any day.


code 1: make reservation, system expects date followed by name (within 20 characters) and makes reservation. If number of bookings exceeds allowed number, then system prints SORRY, QUOTA OVER and moves over to read next code.


code 2: change date of reservation, system expects old  date, name followed by new date


code 3: cancel booking, expects date followed by name. Removes name of the person


code 4: Print reservation, expects  date and prints date and names of persons allowed on that date, if nobody made reservation for that date , prints NO GUESTS


code 5:  Exit


sample in attached image


sample datafile amusement.dat<br>61 15 A1 1 15 A2 1 15 A6 4 15 4 20 1 15 B4 1 15 D3 2 15 A2 20 1 20 A7 3 15 A1 4 15 4 20 5<br>Output:<br>15: A1 A2 A6<br>Normal<br>20: NO GUESTS<br>15: A6 B4 D3<br>20: A2 A7<br>

Extracted text: sample datafile amusement.dat 61 15 A1 1 15 A2 1 15 A6 4 15 4 20 1 15 B4 1 15 D3 2 15 A2 20 1 20 A7 3 15 A1 4 15 4 20 5 Output: 15: A1 A2 A6 Normal 20: NO GUESTS 15: A6 B4 D3 20: A2 A7
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here