Build a simple airline ticket reservation program

Assignment Help Computer Engineering
Reference no: EM1331511

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.

Reference no: EM1331511

Questions Cloud

Program that will search a file of numbers of type int : Write down  a C++ program that will search a file of numbers of type int and write the largest and the smallest numbers to the screen. The file contains nothing but numbers of type int separated by blanks or line breaks.
Explain risk and benefits of creating online store : What risks and benefits do you think a business should consider before creating an online store
Considering various demographic segments : Considering various demographic segments such as older shoppers, teenagers, single mothers, and single, working professionals. What type of store environment might each of these shoppers prefer? What attributes might each segment rate as the most imp..
Explain how can rational thinking the above behaviors : Explain how can rational thinking the above behaviors. How do your thoughts impact, if at all, your opinion of the theory.
Build a simple airline ticket reservation program : modify 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.
Nowc and dcf analysis : Calculate the required investment in NOWC for the three years of the project.  Use these estimates of NOWC to calculate the Cash Flow from NOWC.
Explain online marketing- the arrival of the digital age : What additional steps should The Minister of Public Enterprise in Ireland take to ensure that the 'Celtic tiger' economy continues to be successful?
Explain how business demand is derived demand : Explain how business demand is derived demand?
Write down the worst cardiac simulator of all time : make the worst CARDIAC simulator of all time (in C++) that tells the user how to execute only a single instruction typed as a 3 digit number by the user.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Define corrective, adaptive, perfective, and preventive

explain an example of each of the four types of maintenance: corrective, adaptive, perfective, and preventive. Discuss how the decision to proceed is reached in each case. Be specific.

  Use a database in this fashion ebay

however there is great risk in implementing a database in this fashion Ebay gained an extreme performance boost because the database didn't have to work as hard to ensure that the data "conformed."

  State how you would recover an actual set s

Prove accuracy of your greedy algorithm by stating and proving the loop invariant.State how you would recover an actual set S.

  Suppose that the user will enter only a single digit

suppose that the user will enter only a single digit. Write down C program to display in words what number is entered when a single digit is entered.

  Calculate and show the percentage of calories

Calculate and show the percentage of calories

  Between an open-source or freeware license distribution

As a business owner you are preparing to release a new software game. What factors must you consider to choose between an open-source or freeware license distribution.

  Reconnaissance tools

Enlist some of the popular reconnaissance tools, comparing three of the reconnaissance tools describing the advantages.

  Transmition of the packet

An Ethernet MAC sub layer receives the 1510 bytes of the data from LLC layer. Explain whether the data encapsulation can be within one frame?

  What is the effective access time in ns needed

assume the cache hit ratio is 0.8 and the main memory hit ratio is 0.7. What is the effective access time in ns required to access a referenced word on this system.

  Security accounts manager

The security accounts manager (SAM) database consists of the information on all user profiles. User account set-up populates the database. Explain the fields and options linked with user account set-up.

  Write a program that accepts data continuously

Write a program that accepts data continuously

  Compare two architectural styles

Consider their flexibility, how easy they are to understand and use, and quality of applications they might  produce. Discuss any experiences you have had using these patterns. How has your prior training and preparation influenced your evaluation..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd