-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
57 lines (52 loc) · 1.59 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
#include <iostream>
#include <stdio.h>
#include "PoliticalSys.h"
int main(int argc, char* argv[]) {
//PoliticalSys* politicalSys = new PoliticalSys(argv[1]);
PoliticalSys *politicalSys = new PoliticalSys("/Users/samuel/Downloads/initFile.txt");
char menuOption;
while(menuOption!='0')
{
cout<< "1. Add Politician" << endl;
cout<< "2. Add Party" << endl;
cout<< "3. Remove Politician" << endl;
cout<< "4. Remove Party" << endl;
cout<< "5. Elections" << endl;
cout<< "6. Print Politicians" << endl;
cout<< "7. Print Parties" << endl;
cout<< "8. Biggest Party" << endl;
cout<< "0. Exit" << endl;
cin >> menuOption;
switch(menuOption){
case '1':
politicalSys->addPolitician();
break;
case '2':
politicalSys->addParty();
break;
case '3':
politicalSys->removePolitician();
break;
case '4':
politicalSys->removeParty();
break;
case '5':
politicalSys->elections();
break;
case '6':
politicalSys->printPoliticians();
break;
case '7':
politicalSys->printParties();
break;
case '8':
politicalSys->BiggestParty();
break;
case '0':
cout<<"Bye.."<<endl;
delete politicalSys;
break;
}
}
return 0;
}