Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- enum FlightType { Departure, Arrival };
- struct TimeRec {
- int hour; // 0 to 23
- int min; // 0 to 59
- int sec; // 0 to 59
- };
- struct FlightRec {
- char FlightNO[10];
- char Destination[30];
- TimeRec Time;
- FlightType Ftype;
- bool Delay;
- TimeRec ExpectedTime; // if the flight is delayed
- };
- struct Node {
- FlightRec Entry;
- Node *next;
- };
- class List {
- private:
- Node *head;
- Node *tail;
- int count = 0;
- };
- void Menu()
- {
- cout << "A) Enter the current time " << endl;
- cout << "B) Read flights from a file " << endl;
- cout << "C) Write flights in a file " << endl;
- cout << "D) Enter a new flight " << endl;
- cout << "E) Delete a flight (by entering Flight Number) " << endl;
- cout << "F) Modify Time of a flight " << endl;
- cout << "G) Enter a Delay in a flight " << endl;
- cout << "H) Display all flights " << endl;
- cout << "I) Display depertarues flights that they have not yet departure " << endl;
- cout << "J) Display arrival flights that they have not arrived yet " << endl;
- cout << "K) Sort Flights by Flight Number " << endl;
- cout << "L) Sort flights by Time " << endl;
- cout << "M) Exit " << endl;
- }
- int main()
- {
- system("Pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement