-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cpp
74 lines (63 loc) · 2.06 KB
/
Main.cpp
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
64
65
66
67
68
69
70
71
72
73
74
/****************************************************************
PROGRAM: Airline Booking System
AUTHOR: Tommy Deng
s199762338
COURSE: ICS4U-01
Mr. Hudson
FUNCTION: A database for Fly-by-Night Airlines that keep
track of their seat sales for each flight.
The database contains:
- plane id
- seat number
- seat availability
- customer contact information
- customer boarding pass information (economy
and business class)
Program functionalities inclue:
- text file data storage (read and write)
- adding passenger data
- cancelling/removing reservations
- cancelling entire flight
- displaying customer information (sorted/
alphabetical as a flight manifest)
- reading flight scheduele from seperate file
- reading flight destinations from seperate
file
- displaying flight reservations
- searching for a specific customer's
information
- cancelling flight and outputting the flight's
passenger contact information
INPUT: The inputs are done through the console and with text
files, which include the following:
"Destination.txt"
"FlightSchedule.txt"
"Passenger.txt"
OUTPUT: Like the inputs, the outputs are done through the
console and with text files, which include the
following:
"Destination.txt"
"FlightSchedule.txt"
"Passenger.txt"
NOTES: There are two operating system dependent functions
used. They are:
system("cls") and,
system("pause").
These operate normally on a windows machine. Since they
are purely for aesthetic purposes, alternate methods to
perform the same tasks were not implemented to satisfy
complete functionality on non-windows environments.
****************************************************************/
#include "Controller.h"
using namespace std;
int main()
{
// create airline object and load current/past data from file
Controller *airline = new Controller;
airline->retrieveData();
// display menu and console interaction
while (airline->getRun())
{
airline->display();
}
}