-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
66 lines (63 loc) · 1.7 KB
/
main.cpp
File metadata and controls
66 lines (63 loc) · 1.7 KB
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
//Stanislaw Dutkiewicz 263509
#include <iostream>
#include "Natobase.h"
using namespace std;
//basic interface
int main() {
cout << "Welcome to the NATO base Program!\n";
int genc = 0;
Database Database;
while (genc != 9) {
cout << "\n\nPlease enter your operation:\n\n";
cout << "\n1. Add the base";
cout << "\n2. Display all the bases";
cout << "\n3. Edit the base";
cout << "\n4. Remove the base";
cout << "\n5. Import the base from txt file";
cout << "\n6. Export the base into txt file";
cout << "\n7. Perform the comparison of the NATO base against the Russian divisions";
cout << "\n8. Erase all bases";
cout << "\n9. Exit\n\n";
cin >> genc;
switch (genc) {
case 1: {
Database.Read_data();
break;
}
case 2: {
Database.Print_data();
break;
}
case 3: {
Database.EditDB();
break;
}
case 4: {
Database.RemoveDB();
break;
}
case 5: {
Database.OpenDB();
break;
}
case 6: {
Database.SaveDB();
break;
}
case 7: {
Database.Compare();
break;
}
case 8: {
Database.Clear();
break;
}
case 9: {
genc = 9;
break;
}
}
}
std::cout << "Thank you for using our program. Have a good day!" << endl;
return 0;
}