Purchase Solution

Simple console airline ticket reservation program in C++.

Not what you're looking for?

Ask Custom Question

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)
* firstName
* lastName
* originatingCity
* destinationCity
* flightNumber
* departureTime
* departureDate

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.

Purchase this Solution

Solution Summary

A console C++ program that defines a Reservation class and imitates reservation system. The records are stored in a list.

Solution Preview

Attached is a zipped C++ project. Everything compiles. The main program ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

C# variables and classes

This quiz contains questions about C# classes and variables.