Create a simple airline ticket reservation program in C++ that keeps track of individual passenger names, and their associated flight numbers, departure dates and times, and originating and destination cities. You may implement your own linked list library; however, it is recommended that you make use of the linked list API in the C++ standard template library.
At a minimum, this program should implement at least one object called ReservationRecord and should hold the following data for each passenger:
* recordId (must be an variable of type int. This field uniquely identifies a record)
Provide the appropriate accessor methods to set and get the data for these fields. For example getFirstName() and setFirstName(string firstName).
The main program must provide the following functionality:
1. When the program is first started, it should read a data file called reservation.dat. If the file exists, the program must load its data for each record into the reservation linked list.
2. When the program exits, it should save all of the entries in the reservation linked list into the reservation.dat data file. At this point, if this file does not exist, the program should create it.
3. Provide a text-based user interface to allow the user to operate on the reservation data. Each reservation record must be placed in a global linked list that holds all of the reservations. The program should allow the user to do the following:
(a) Reserve a ticket - allows the user to enter all fields except the recordId, which is a number that is automatically generated by the program. After the data is entered it should be placed in the linked list.
(b) Search for passenger - allows the user to search for a passenger by lastName. If the entry exists in the linked list then print all fields in the reservation record. If there are multiple passengers with the same last name, then all passengers with that last name should be printed.
(c) Cancel a reservation - allows the user to delete a reservation record from the linked list using the recordId as the key.
(d) Modify a reservation - allows the user to modify any of the fields in a reservation record (except the recordId) for given passenger by recordId.
(e) Display passengers - displays all of the records in the reservation linked list.© BrainMass Inc. brainmass.com September 22, 2018, 9:13 am ad1c9bdddf - https://brainmass.com/computer-science/cpp/simple-console-airline-ticket-reservation-program-in-c-326374
Attached is a zipped C++ project. Everything compiles. The main program ...
A console C++ program that defines a Reservation class and imitates reservation system. The records are stored in a list.