-
Notifications
You must be signed in to change notification settings - Fork 0
/
flight.h
72 lines (55 loc) · 1.56 KB
/
flight.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*Author: <Taylor Roozen>
Program: <flight.h>
Last Modified: <11/30/2016>
Description:
Description: This is the header file for a flight scheduling class, ATC
See full description in the .cpp file of the same name, along with
descriptions of the class methods.
*/
#include <cstdlib>
#include <string>
#include <vector>
using namespace std;
#ifndef AIR_TRAFFIC_CONTROL
#define AIR_TRAFFIC_CONTROL
class ATC
{
public:
ATC();
~ATC();
void inputFlight(string info, int lineNumber);
void processCommands(string command, int lineNumber);
string generateLine();
private:
struct flight
{
int ID;
char type;
string source, dest;
int hour, minute, T;
flight* left;
flight* right;
flight* reference;
};
flight* landings;
flight* takeoffs;
flight* flightTimes;
flight* flightID;
int nT, nL, nFT, numS;
int rT, rL, lT, lL;
vector<string> schedule;
void onDemandAssignment(flight* tree, flight* f, int minTime);
void printTraverse(flight* tree);
flight* insert(flight* tree, flight* f);
void copyFlight(flight* flight1, flight* flight2);
flight* getFlight(flight* tree, int flightID);
flight* getArray(char typ, int numFlights);
string getString(flight* F, int numFlights);
void remakeSchedule(int typ);
flight* removeFlight(flight* node, int t);
flight* successor(flight* node);
flight* minimum(flight* node);
flight* maximum(flight* node);
void deleteTree(flight * tree);
};
#endif