Advertisement
Guest User

Untitled

a guest
May 4th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. enum FlightType { Departure, Arrival };
  5.  
  6. struct TimeRec {
  7. int hour; // 0 to 23
  8. int min; // 0 to 59
  9. int sec; // 0 to 59
  10. };
  11.  
  12. struct FlightRec {
  13. char FlightNO[10];
  14. char Destination[30];
  15. TimeRec Time;
  16. FlightType Ftype;
  17. bool Delay;
  18. TimeRec ExpectedTime; // if the flight is delayed
  19. };
  20.  
  21. struct Node {
  22. FlightRec Entry;
  23. Node *next;
  24.  
  25.  
  26. };
  27.  
  28. class List {
  29. private:
  30. Node *head;
  31. Node *tail;
  32. int count = 0;
  33.  
  34. };
  35.  
  36.  
  37.  
  38. void Menu()
  39. {
  40. cout << "A) Enter the current time " << endl;
  41. cout << "B) Read flights from a file " << endl;
  42. cout << "C) Write flights in a file " << endl;
  43. cout << "D) Enter a new flight " << endl;
  44. cout << "E) Delete a flight (by entering Flight Number) " << endl;
  45. cout << "F) Modify Time of a flight " << endl;
  46. cout << "G) Enter a Delay in a flight " << endl;
  47. cout << "H) Display all flights " << endl;
  48. cout << "I) Display depertarues flights that they have not yet departure " << endl;
  49. cout << "J) Display arrival flights that they have not arrived yet " << endl;
  50. cout << "K) Sort Flights by Flight Number " << endl;
  51. cout << "L) Sort flights by Time " << endl;
  52. cout << "M) Exit " << endl;
  53. }
  54.  
  55.  
  56.  
  57.  
  58. int main()
  59. {
  60.  
  61.  
  62. system("Pause");
  63. return 0;
  64.  
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement