-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
35 lines (26 loc) · 924 Bytes
/
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
#include <iostream>
#include "Database.h"
using namespace std;
using namespace Records;
int main()
{
Database myDB;
RailroadTicket& ticket1 = myDB.addTicket("Andrey Bulat", "Kiev",
"chernivtsi", "Platzkart", 118, 1, 48);
RailroadTicket& ticket2 = myDB.addTicket("Olexiy Miroshnik", "Kiev",
"Lviv", "Platzkart", 404, 4, 2);
RailroadTicket& ticket3 = myDB.addTicket("Billy Milligan", "Somewhere",
"Nowhere", "Deluxe", 42, 42, 42);
cout << "All tickets in database: " << endl;
cout << endl;
myDB.displayAll();
cout << endl;
cout << "All tickets with type 'Platzcart': " << endl;
cout << endl;
myDB.displayByType("Platzkart");
cout << endl;
cout << "All tickets with train number 42: " << endl;
cout << endl;
myDB.displayByTrainNumber(42);
return 0;
}