Create a simple airline ticket reservation program in c++

Assignment Help C/C++ Programming
Reference no: EM13936892

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: EM13936892

Questions Cloud

Addresses the concepts of actus reus : Write a paper that addresses the concepts of actus reus, mens rea, mistake of fact, and mistake of law based on the given hypothetical.
Prepare summary journal entries including disposition : Prepare summary journal entries for August, including the disposition of under- or over- allocated conversion costs. Assume no direct materials variances.
Explain the main principles involved in normalization : Does normalization also help you to collect differently spliced forms of a given gene by equalizing the relative abundance of those differently spliced mRNAs? And if it does why?
Nic saybin enterprises accounting department : Nic Saybin Enterprises Accounting Department collects all pertinent monthly operating data. Selected data are presented below for the current month. From the data provided,
Create a simple airline ticket reservation program in c++ : 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.
Write a float function that prompts the user for radius : Create an enumerated type with three values: POSITIVE, NEGATIVE, and ZERO. Write a function that prompts the user for an integer, reads the integer, and returns one of the enumerated values based on that number (e.g., returns NEGATIVE if the input..
Management document to provide a comprehensive idea : The above documents should clearly be developed using a project tool that is available to you. You should make necessary assumptions in deciding your basis that would yield to the above documents. You are required to state your assumptions clearly..
How does cloning impact both food safety and animal welfare : How does cloning impact both food safety and animal welfare, i.e., what is the relationship of cloning to both food safety and animal welfare?
What are the main ethical issues involved : What are the main ethical issues involved - what actions are available to Sharon to resolve the dilemma she faces?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program to find smallest-largest values

Write a program c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Computer programming techniques

Construct a program from a design and use appropriate functions

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Execution goes back to the caller by default

The execution goes back to the caller by default, when the last statement in a method is reached? Assuming that no return statement is used, do you agree with the preceding statement?

  Program to compute diameter in centimeters of a steel rod

Write a program to compute the diameter in centimeters of a steel rod, an aluminum rod, and a copper rod, which can withstand a particular compression load.

  Define the sums of every even column of 2d array

Define the sums of every even column of 2D array in C language - Prepare this program in c language. Show all your work.

  Why does the neverwet spray protect it from water

As is know, acetone is a polar molecule like water, so isn't it suppose to mix? So my question is: why does the Neverwet spray protect it from water but not from oils and detergents?

  Design a calculator program

Design a calculator program that will add, subtract, multiply, or divide two numbers input by a user

  Create a file, shared.txt

When your program starts, it shall do the following:1. Create a file, SHARED.txt, in the current directory (cwd). 2. Write it's pid (Process ID) followed by a Carriage Return and Newline in the file.

  Write a function named putinorder

Write a function named "PutInOrder" that has 2 double reference parameters (say a and b). The function rearranges the values pointed to by a and b such that a points to the smallest value and b to the largest value.

  Produce a c program to calculate the total price for order

Your friend has just opened a computer appliances shop at Changloon. He asked your help to develop a computer program which can be used at the counter. Your program should be able to input the customer's order which could be more than one item. Produ..

  Departmental store in shanghai

Shopping Spree is a leading departmental store in Shanghai. The store has a number of regular customers who purchase bulk items. The store also conducts regular feedback sessions to analyze customer satisfaction levels.

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