-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
46 lines (41 loc) · 1.06 KB
/
main.cpp
File metadata and controls
46 lines (41 loc) · 1.06 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
#include <iostream>
#include "account.h"
#include "menu_option.h"
#include"do_transactions.h"
using namespace std;
using namespace banking_system;
int main()
{
Account a1("Anneshu Nag", 5000);
// a1.Print();
// a1.Deposit(100);
// a1.Print();
// a1.Withdraw(50);
// a1.Print();
MenuOption option_sel;
BankMenuOption bank_options;
DoTransactions do_transactions;
do
{
option_sel = bank_options.ReadUserInput();
switch (option_sel)
{
case MenuOption::Withdraw:
do_transactions.DoWithdraw(a1);
break;
case MenuOption::Deposit:
do_transactions.DoDeposit(a1);
break;
case MenuOption::Print:
do_transactions.DoPrint(a1);
break;
case MenuOption::Quit:
cout << "Exiting program.\n";
return 1;
default:
cout << "Invalid option. Please try again.\n";
break;
}
} while (option_sel != Quit);
return 0;
}