I need this done in C++ please! This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that is displayed by this program. This program is meant to replace the flight status report program (Programming Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file token wise.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I need this done in C++ please! This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that is displayed by this program. This program is meant to replace the flight status report program (Programming Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file token wise. 

This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport
Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that
is displayed by this program. This program is meant to replace the flight status report program (Programming
Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file
token wise. This program is part of your mid-term assignment. The other part of the mid-term is to integrate all the parts
into the Airport Application Project
This program consists of upgrading the previous Flight Status Report program in Programming Assignment 3 to read
information from each data file line by line, and store information in an array of string, process the information, and
display it by sequential or linear traversing the appropriate array. You will need to create two, one dimensional arrays
of string type.
All the requirements and constraints below will remain as they were in Programming Assignment 3. What will change is:
Reading Information procedure from Data File into an array
Storing the data in an unordered form
Displaying procedure for the data by linearly traversing the array
Requirements
In Programming Assignment 3 you developed a menu driven application that displays a report of arrivals and departures
into an out of Los Angeles airport. The display was for a flight information for 12 hour period at a time. The arrival and
departure information was given in two separate files. Arrivals.txt and Departures.txt with the following format:
Flight Number: String in the format AAXXXX where XXXX is numerals
Gate Number: String in the format NN (01 for gate 1) etc.
Destination or Source Airport : String
Scheduled Time : String in the format HHMM
Actual Departure or Arrival Time: String in the Format HHMM
The upgraded program must use the following algorithm
Algorithm for file reading, processing, storing and displaying
In this program, your function that reads the arrival and departure information from the files must
• the C++ getline method to input the data line by line
• use istringstream operations to consume the tokens on each line
• calculate the delay times
• create a new string with the input data and the delay times
• store this string in as an element of a one dimensional array
• traverse the two arrays created, one for arrival status and the other for departure status, and display the reports in
the same format as before.
Contraints: (same as program 3)
• The delay needs to be calculated as a difference between the scheduled and actual times. Here you will need to
convert the string scheduled and actual times to integer minutes and compute the difference. Use a standard library
functions like stoi() to do the conversion. The delay algorithm will need to work for the two 12 hour period 12:00am
to 11:59am and 12:00 noon to 11:59pm. So you will need to calculate the delay in minutes for some example times
given below
Transcribed Image Text:This program implements the top-level menu option 'R' of the Airport Application and constitutes Part 2 of the Airport Application Project requirement. When the user selects 'R' in the airport application, she will be taken to the "page" that is displayed by this program. This program is meant to replace the flight status report program (Programming Assignment 3) that did not use arrays to store the flight status information. It also reads the information from the file token wise. This program is part of your mid-term assignment. The other part of the mid-term is to integrate all the parts into the Airport Application Project This program consists of upgrading the previous Flight Status Report program in Programming Assignment 3 to read information from each data file line by line, and store information in an array of string, process the information, and display it by sequential or linear traversing the appropriate array. You will need to create two, one dimensional arrays of string type. All the requirements and constraints below will remain as they were in Programming Assignment 3. What will change is: Reading Information procedure from Data File into an array Storing the data in an unordered form Displaying procedure for the data by linearly traversing the array Requirements In Programming Assignment 3 you developed a menu driven application that displays a report of arrivals and departures into an out of Los Angeles airport. The display was for a flight information for 12 hour period at a time. The arrival and departure information was given in two separate files. Arrivals.txt and Departures.txt with the following format: Flight Number: String in the format AAXXXX where XXXX is numerals Gate Number: String in the format NN (01 for gate 1) etc. Destination or Source Airport : String Scheduled Time : String in the format HHMM Actual Departure or Arrival Time: String in the Format HHMM The upgraded program must use the following algorithm Algorithm for file reading, processing, storing and displaying In this program, your function that reads the arrival and departure information from the files must • the C++ getline method to input the data line by line • use istringstream operations to consume the tokens on each line • calculate the delay times • create a new string with the input data and the delay times • store this string in as an element of a one dimensional array • traverse the two arrays created, one for arrival status and the other for departure status, and display the reports in the same format as before. Contraints: (same as program 3) • The delay needs to be calculated as a difference between the scheduled and actual times. Here you will need to convert the string scheduled and actual times to integer minutes and compute the difference. Use a standard library functions like stoi() to do the conversion. The delay algorithm will need to work for the two 12 hour period 12:00am to 11:59am and 12:00 noon to 11:59pm. So you will need to calculate the delay in minutes for some example times given below
Scheduled Time
Actual Time
Delay
1204
0245
169
0345
0405
20
1105
1210
65
• Each flight has an entry in the file with a comma as separator as follows:
• Flight Number, Gate Number, Destination/Source Airport, Scheduled Time, Actual Time
• The entries in this file are not sorted and scheduled times are not in order.
You do not need to save the data or sort in this assignment. This will be done later.
• Depending on the menu option selected your output should display all the entries that are read from the file txt or
Departures.txt. The additional field to be displayed is the Delay if any. Delay is an integer in the range 0 to 719
representing a maximum of 11 hours and 59 minutes of delay. You may assume that flights do not reach ahead of
time.
• The menu has three options only as follows:
• Arrival Times : A
• Departure Times : D
• Quit : Q
It needs to have accept lower case responses and do input validation. So loop until user enters one of the above option
• Your product should consist of three files.
• cpp : Contains main program with main function calling a function called FlightStatusReportMenu();
• h: Contains all the function prototypes
• cpp : Contains all the function definitions
• Your program should be designed in a modular manner with functions defined to open input files, read file
information line by line, process the information and display as required.
• Note that since we have not done arrays yet, the information is not going to be stored in an array.
You may read one line at a time and tokenize the input line using instringstream or any other string processing
mechanism.
• You will need to process the time in the string HHMM format to calculate the delay time as integer minutes
• If files do not open, then no exception handling is required. You would display
"File Error: Please exit the application"
Transcribed Image Text:Scheduled Time Actual Time Delay 1204 0245 169 0345 0405 20 1105 1210 65 • Each flight has an entry in the file with a comma as separator as follows: • Flight Number, Gate Number, Destination/Source Airport, Scheduled Time, Actual Time • The entries in this file are not sorted and scheduled times are not in order. You do not need to save the data or sort in this assignment. This will be done later. • Depending on the menu option selected your output should display all the entries that are read from the file txt or Departures.txt. The additional field to be displayed is the Delay if any. Delay is an integer in the range 0 to 719 representing a maximum of 11 hours and 59 minutes of delay. You may assume that flights do not reach ahead of time. • The menu has three options only as follows: • Arrival Times : A • Departure Times : D • Quit : Q It needs to have accept lower case responses and do input validation. So loop until user enters one of the above option • Your product should consist of three files. • cpp : Contains main program with main function calling a function called FlightStatusReportMenu(); • h: Contains all the function prototypes • cpp : Contains all the function definitions • Your program should be designed in a modular manner with functions defined to open input files, read file information line by line, process the information and display as required. • Note that since we have not done arrays yet, the information is not going to be stored in an array. You may read one line at a time and tokenize the input line using instringstream or any other string processing mechanism. • You will need to process the time in the string HHMM format to calculate the delay time as integer minutes • If files do not open, then no exception handling is required. You would display "File Error: Please exit the application"
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education