-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflightSystem.h
61 lines (52 loc) · 1.18 KB
/
flightSystem.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
/*
* flightSystem.h
* prog5
*
* Created by Aaron Maturen on 11/18/09.
*
*/
#include <string>
#include <vector>
#include <iostream>
#include <iomanip>
#include <map>
using namespace std;
struct city{
int uid;
string name;
};
struct flight{
string flight_id;
string departure_city;
string destination_city;
int arrival_time;
int departure_time;
int cost;
int capacity;
};
class vertex{
public:
int cost;
int id;
vector<flight> route;
vector<flight> path;
};
class flightMatrix{
public:
bool addFlight(string, string, string, int, int, int, int);
int searchCity(string);
int addCity(string);
string lookupCity(int);
bool addPath(void);
flight searchFlight(string);
vector<flight> dijkstra(string, string, char);
vector<flight> cityInfo(int);
vector<flight> searchRoute(string, string);
bool pathExists(void);
bool printCities(void);
void printFlights(void);
private:
multimap<int,flight> flights;
vector<city> cities;
multimap<int, flight>::iterator it;
};