This repository was archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbankir.cpp
More file actions
53 lines (43 loc) · 1.3 KB
/
bankir.cpp
File metadata and controls
53 lines (43 loc) · 1.3 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
#include <iostream>
#include <vector>
#include "bankir.h"
#include "customer.h"
#include "account.h"
#include "list.h"
#include "functionallity.h"
using namespace std;
int main()
{
customerList LC;
createCustomerList(LC);
accountList LA;
createAccountList(LA);
List L;
createList(L);
addrAccount AA;
addrCustomer AC;
address A;
showHelp();
string input, command;
vector <string> arguments;
cout << "[main]>> ";
while (getline(cin, input) && input != "exit")
{
parse(input, command, arguments);
if (command == "help") showHelp();
else if (command == "info") showInfo(L);
else if (command == "insert") doInsert(arguments, LC, LA, L);
else if (command == "delete") doDelete(arguments, LC, LA, L, AC, AA, A);
else if (command == "update") doUpdate();
else if (command == "show") doShow(arguments, LC, LA, L);
else if (command == "link") doLinkList(arguments, LA, L);
else if (command == "unlink") doUnlinkList(arguments, LA, L);
else if (command == "all") doAll(arguments, LC, LA);
else if (command == "maxa") doFindMaxBalance(LA, LC);
else if (command == "twos") doTwos(LA, LC);
else if (command != "")
returnMsg(" Can't recognize \"" + command + "\" command!");
cout << "[main]>> ";
}
return 0;
}