-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (29 loc) · 781 Bytes
/
main.cpp
File metadata and controls
38 lines (29 loc) · 781 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
36
37
#include <iostream>
#include <string>
using namespace std;
#include "ReservationSystem.h"
int main() {
ReservationSystem R;
R.showAllFlights();
R.addFlight(104, 4, 5);
R.addFlight(234, 8, 3);
R.addFlight(76, 6, 2);
R.showAllFlights();
int rowRes1[4] = {3, 3, 1, 1};
char colRes1[4] = {'A', 'B', 'B', 'C'};
int code1 = R.makeReservation(104, 4, rowRes1, colRes1);
if (code1 != -1)
cout << "Your reservation code is " << code1 << endl;
int rowRes2[4] = {1, 2,2, 3};
char colRes2[4] = {'A', 'B', 'C', 'C'};
int code2 = R.makeReservation(104, 4, rowRes2, colRes2);
if (code2 != -1)
cout << "Your reservation code is " << code2 << endl;
R.showReservation(1);
R.showReservation(2);
R.showFlight(104);
R.cancelFlight(104);
R.showReservation(1);
R.showReservation(2);
return 0;
}