forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAirlineManagementSystem.hpp
More file actions
35 lines (28 loc) · 959 Bytes
/
AirlineManagementSystem.hpp
File metadata and controls
35 lines (28 loc) · 959 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
34
35
#ifndef AIRLINE_MANAGEMENT_SYSTEM_HPP
#define AIRLINE_MANAGEMENT_SYSTEM_HPP
#include <vector>
#include <string>
#include "Flight.hpp"
#include "Passenger.hpp"
#include "Booking.hpp"
class AirlineManagementSystem {
private:
std::vector<Flight*> flights;
std::vector<Passenger*> passengers;
std::vector<Booking*> bookings;
int bookingIdCounter;
public:
AirlineManagementSystem();
~AirlineManagementSystem();
void addFlight(Flight* flight);
void addPassenger(Passenger* passenger);
std::string createBooking(Flight* flight, Passenger* passenger, int seatNumber);
bool cancelBooking(std::string bookingId);
void displayAllFlights() const;
void displayAllPassengers() const;
void displayAllBookings() const;
Flight* findFlight(std::string flightNumber) const;
Passenger* findPassenger(std::string passportNumber) const;
Booking* findBooking(std::string bookingId) const;
};
#endif