-
Notifications
You must be signed in to change notification settings - Fork 0
/
Flight.h
63 lines (49 loc) · 1.78 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
#include <array>
#include "Seat.h"
#ifndef FLIGHT_H
#define FLIGHT_H
class Flight{
private:
array<Seat, 10> seatList;
int numPassengers;
string flightNumber;
//correspond to index in locations array
int departurePlanet;
int destinationPlanet;
string departureTime;
public:
Flight(array<Seat, 10> seat);
Flight(array<Seat, 10> seat, string flightNum, int dep, int dest);
Flight(array<Seat, 10> seat, string flightNum, int dep, int dest, int hour, int minute);
int getNumPass();
void setPass(int num); //remove later - for testing
//sorting algorithms
int seatIndex(string seat);
string capitalizeFullName(string name);
//seating availability & diagrams
void printSeatingDiagram();
void printAvailableSeats();
bool checkSeatAvailable(string seatNumber);
//passenger manifests
void printManifest(); //sorted by seat number, passengers only
void printManifestFull(); //unreserved seats also included
void printManifestAlphabetical(); //passengers shouldn't have same name
//seats reservations
void setSeat(string seatNumber, string passengerID);
void setSeat(string seatNumber, string first, string last, string address, string phone);
void emptySeat(string seatNumber);
//seat information
string findSeat(string passengerID); //OPTIMIZE using numObjects...
string findSeat(string first, string last, string address, string phone);
void printSeat(string seatNumber);
//flight information attributes
string getFlightNumber();
string getDepPlanet();
string getDestPlanet();
string getDepTime();
void setFlightNumber(string num);
void setDestPlanet(int index);
void setDepPlanet(int index);
void setDepTime(int hr, int minute); //parameters
};
#endif