Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write code for a program that can be used at a Airport. 1) In the main.cpp there

ID: 3550560 • Letter: W

Question

Write code for a program that can be used at a Airport.


1) In the main.cpp there should be code for object array declaration and menu

2) Flight.h is a header file that contains class definition

3) Flight.cpp is a file that contains all class function defintions.


-Write a class representing an airline flight. A flight has the following members:

~ string airline

~ int flight number (>0)

~ string origin airport (3 letter airport code)

~ Destination airport (also 3 letter code)

~ Departure (int wrote as eg. 2:30 is 230, 5:00 is 500)

~Arrival Time (written same as departure time)


A default constructor is required that sets all the ints to 0 and strings as empty strings.


A constructor that takes the parameters above (in that order)


A setter for the airline that makes sure the airport code is at least 2 char long but less then 4.


Also a setter for the arrival time/departure that checks the code being at least 3 char long


Arrival?departure times should betwen 0 and 2359 (else, print an error message)


---------Main Program-------


a menu with the following options:

-Add a flight (should prompt the user regarding what to enter, then call member functions to read data from cin)

-Delete a flight (asks the user for airline and flight number. if it exists remove it, if not, print error message)

-Edit a flight (ask for airline flight and number then use member functions to print flights data to cout, then ask for updated info)


-Show all departures for one airport (select arrival/departure and display them, based on the users input)

-Quit (exits the program)


OTHER INFO: in the main the flights are an arra (>250)

    ***Visual Studios 2010***

Explanation / Answer

Does everything as described above. I wrote it using Visual Studios. I posted the links to the 3 files in my dropbox


Flight.h: https://www.dropbox.com/s/40t1m1yrr7o2jcr/Flight.h

Flight.cpp: https://www.dropbox.com/s/whu9v8ttkqdm0nv/Flight.cpp

main.cpp: https://www.dropbox.com/s/i9lto0nv5r61mc3/main.cpp

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote