Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Airline Delays C++ Your task is to create an application that would allow us to extract some interesting information from flight delays recorded at two

Airline Delays C++

Your task is to create an application that would allow us to extract some interesting information from flight delays recorded at two major airports of NYC JFK and LGA. See attached the data file. Each row in the file corresponds to a delayed flight that was recorded in January 2015 for JFK and LGA. While this particular file is for January 2015, we would want to be able to use your program for different files as we get new data. Assume that the file contains at most 1000 records (there may be less records than that). The first column is always the 3 letters airport code of the originating airport and the space delimited second column is the departure delay encountered in minutes.Your program should read this file into arrays. Make sure that the file exists. If the program cannot find the file, it should display an error message telling the user that the data file could not be found. Once the file is successfully read, your program should allow user to get the following information:

Feature #1 Average Delay: Ask user to enter an airport code. Given the airport code, report the average delay in minutes encountered for the flights that originated from that airport. If user enters ALL (without quotation mark) as the airport code, you should report the average delay for all flights regardless of the originating airport.

Feature #2 Maximum Delay: Report the maximum delay encountered on these flights along with the airport from which that flight originated. Make sure to report the delay in hours note that the delays are in minutes in the file, but we want to display the delay in hours for this feature only.

Feature #3 Flight Count: Ask user to enter minimum delay in minutes and the airport code. Report the number of flights from that airport that encountered delays greater than or equal to the user specified minutes. If user enters ALL for airport, display any flights that is delayed more than the specified number of minutes regardless of the originating airport.

Feature #0 Exit: Exit the program. Make sure that your code is commented and indented properly. Make sure that each feature is in its own function.

airline_delays.txt files is in the following section below. It's in one column.

LGA 3 JFK 84 LGA 5 JFK 38 LGA 25 JFK 50 JFK 19 JFK 34 JFK 49 LGA 5
LGA 13 LGA 98 JFK 8 JFK 3 LGA 13 JFK 3 LGA 9 LGA 25 LGA 29 LGA 1
LGA 32 JFK 46 JFK 57 JFK 115 LGA 42 JFK 5 LGA 5 LGA 22 JFK 88 LGA 147
LGA 105 JFK 32 LGA 5 LGA 3 LGA 11 JFK 2 LGA 19 LGA 2 JFK 16 LGA 1
LGA 26 JFK 6 JFK 1 JFK 144 LGA 60 LGA 7 LGA 38 JFK 33 LGA 32 LGA 77
JFK 189 LGA 58 LGA 88 JFK 21 JFK 1 LGA 12 LGA 30 JFK 121 LGA 28 LGA 29
LGA 59 JFK 12 LGA 135 JFK 9 LGA 13 LGA 12 LGA 110 JFK 1 LGA 3 JFK 2
LGA 5 LGA 45 LGA 34 JFK 28 LGA 48 JFK 13 JFK 2 LGA 48 LGA 2 JFK 1
LGA 115 JFK 45 LGA 69 JFK 149 LGA 5 JFK 19 LGA 83 JFK 43 LGA 19 LGA 7
LGA 228 LGA 30 LGA 95 JFK 20 JFK 45 LGA 198 JFK 6 LGA 55 JFK 17 JFK 1
LGA 46 LGA 76 JFK 4 LGA 14 LGA 166 JFK 8 LGA 97 LGA 3 JFK 64 JFK 14
LGA 3 LGA 39 LGA 37 LGA 14 JFK 79 JFK 24 LGA 10 JFK 5 JFK 19 JFK 32
JFK 80 LGA 21 JFK 10 LGA 14 JFK 34 JFK 13 JFK 32 LGA 6 JFK 5 LGA 35
JFK 99 JFK 57 LGA 2 JFK 17 LGA 3 LGA 41 LGA 6 JFK 68 LGA 1 JFK 31
JFK 4 JFK 103 JFK 5 JFK 8 LGA 6 JFK 35 JFK 7 LGA 1 LGA 1 LGA 10
JFK 9 JFK 2 LGA 8 LGA 8 LGA 2 LGA 122 LGA 58 LGA 32 LGA 55 JFK 51
JFK 15 JFK 3 LGA 90 JFK 46 LGA 67 LGA 29 LGA 28 JFK 27 LGA 138 LGA 9
JFK 24 JFK 206 LGA 10 LGA 29 LGA 18 LGA 77 JFK 65 JFK 21 LGA 70 LGA 119
JFK 128 JFK 106 LGA 18 JFK 35 LGA 4 LGA 5 JFK 1 JFK 2 JFK 94 JFK 33
JFK 2 JFK 20 LGA 97 LGA 11 LGA 83 JFK 24 LGA 91 JFK 34 LGA 9

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics Of A Networked World Semantics For Grid Databases First International Ifip Conference Icsnw 2004 Paris France June 2004 Revised Selected Papers Lncs 3226

Authors: Mokrane Bouzeghoub ,Carole Goble ,Vipul Kashyap ,Stefano Spaccapietra

2004 Edition

3540236090, 978-3540236092

More Books

Students also viewed these Databases questions

Question

How many different prime factors does 10,241 have?

Answered: 1 week ago

Question

Describe the linkages between HRM and strategy formulation. page 74

Answered: 1 week ago

Question

Identify approaches to improving retention rates.

Answered: 1 week ago