forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFlight.hpp
More file actions
33 lines (27 loc) · 777 Bytes
/
Flight.hpp
File metadata and controls
33 lines (27 loc) · 777 Bytes
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
#ifndef FLIGHT_HPP
#define FLIGHT_HPP
#include <string>
#include <vector>
#include "Seat.hpp"
class Flight {
private:
std::string flightNumber;
std::string origin;
std::string destination;
std::string departureTime;
int capacity;
std::vector<Seat> seats;
public:
Flight(std::string flightNumber, std::string origin, std::string destination,
std::string departureTime, int capacity);
std::string getFlightNumber() const;
std::string getOrigin() const;
std::string getDestination() const;
std::string getDepartureTime() const;
int getCapacity() const;
std::vector<Seat>& getSeats();
void displayFlightInfo() const;
bool bookSeat(int seatNumber);
bool cancelSeat(int seatNumber);
};
#endif