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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

 

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.

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
Transcribed Image 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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 8 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY