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

  Program to select numbers of three finalists

You have three identical prizes to give away and a pool of 10 finalists. The finalists are allocated numbers of 1 to 10. Write down a program to randomly select the numbers of 3 finalists to receive a prize.

  Explain the osi reference model and tcp/ip protocol

Describe protocols at the different layers of the OSI model and explain their functionality.explain the Differentiate between a confirmed service and a nonconfirmed service with respect to service primitives.

  Examine the key components of a decision support system

Examine the key components of a decision support system

  Estimating the running time of quicksort

The running time of quicksort may be improved in practice by taking the benefit of the fast running time of the insertion sort when its input is "nearly" sorted.

  Entity-relationship diagrams

Develop an entity relationship diagram for the case, stating any assumptions you seem as essential.

  What is the sql

Recently AMI has been experiencing significant downtime because of  a failing software application written for AMI when the company started. This Access database application is responsible for a main manufacturing process.

  Calculate and show the percentage of calories

Calculate and show the percentage of calories

  Purpose and use of the java adapter classes

Purpose and use of the Java Adapter classes

  Program showing duplicate values in an array

Write down a program in C in order to show the duplicate values in an array, Documentation and Naming Style Sheet should include: Description of what program does, Summary of the problem's specifications and assumptions.

  Identify the main elements of the us criminal

recognize the key elements of the US criminal justice system and explain how they relate to the job of the computer forensic investigator? Support the opinion or any arguments you may make.

  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 meaning of operator precedence

Depending on operator precedence, what values might be associated with the expression 6 + 2 * 3.

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