Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

Assignment

Eagle Airlines has contracted you to implement a basic airline ticketing system for passengers. Your program will allow the application's user to enter the information associated with each passenger. The ticketing system will be managed using a single linked list in memory (this can be a global variable). The program must use the "list" API in the C++ standard template library (STL).

All of the attributes associated with each passenger's ticket will be stored as a single object within the linked list. The program must implement at least one class that will hold the following variables (input validation is only required where indicated):

• 2 recordLocator - A string variable that holds an automatically randomly generated eight character string. For example: XHJYQASY, AHJYQARE, etc. Duplicates are not allowed.

• firstName - A string variable that holds the passenger's first name.

• lastName - A string variable that holds the passenger's last name.

• departureDate - A string variable in the form mm/dd/yyyy. The program must re-prompt the user to re-enter the date if it is not a valid form or if it is not a valid date.

• arrivalDate - A string variable in the form mm/dd/yyyy.

• seatNumber - A string variable in the form NNL, where N is a number between 0 and 9 and L is a letter between A and F. The program must reprompt the user to re-enter the seat number if it is not a valid.

• numberOfLuggage - An integer variable that holds the number of luggage being checked.

• ticketCost - A double variable that holds the cost associated with the ticket.

Provide the appropriate methods to set and get the data for each of these class variables. For example setTicketCost(double cost) and double getTicketCode(). The BookInventory provides an example on how this can be done. In addition, the main program must provide the following functionality:

1. When the program is first started, it must read a data file called tickets.dat. The program should not prompt the user for the name of the data file. If the file exists, the program will load the data for each ticket into the global linked list. If the file does not exist, the program will start with an empty linked list.

2. The program should provide a simple text-based user interface that manages the all of the tickets within the linked list. Each ticket must be placed in linked list as an object that holds all of the information associated with it. The user interface will allow the user to perform the following:

(a) Display Tickets - displays all of the tickets that are in the linked list along with their associated fields. In addition, this option must print the total number of tickets in the linked list and the total cost of all of the tickets in the linked list.

(b) Enter Ticket - allows the user to enter all of the fields associated with a given ticket, except for the recordLocator, which will be automatically generated by the program as previously mentioned. After the data fields are entered, the program will place the ticket object into the global linked list.

(c) Cancel Ticket - allows the user to delete a ticket from the linked list using the recordLocator as the key. The program must display a message if the ticket is not found in the linked list.

(d) Search for Ticket - allows the user to find a ticket. The program will prompt the user to enter the recordLocator and will display all of the fields associated with the ticket if it is found. The program must display a message if the ticket is not found in the linked list.

(e) Edit Ticket - allows the user to edit the fields for a given ticket that is in the linked list (except for the recordLocator). The program must use the recordLocator as the key to find the ticket to edit. For simplicity, the program may re-prompt the user to re-enter all of the fields associated with the given ticket; but it again must reuse the recordLocator value. Display a message if the ticket is not found in the linked list.

(f) Exit System - before the program exits, it must save all of the data in the linked list to the data file. I recommend using a standard text file with one field per line. At this point, if the file does not exist, the program will create it.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92076320
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Programming Language

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As