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. i)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. ii)code 2: change date of reservation, system expects old date, name followed by new date iii)code 3: cancel booking, expects date followed by name. Removes name of the person iv)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 v)code 5: Exit Sample attached in image.
C/C++
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.
i)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.
ii)code 2: change date of reservation, system expects old date, name followed by new date
iii)code 3: cancel booking, expects date followed by name. Removes name of the person
iv)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
v)code 5: Exit
Sample attached in image.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 8 images