MCPcopy Create free account
hub / github.com/Rustam-Z/cpp-programming / Menu

Function Menu

Project_Bank_Management_System/Header.h:35–69  ·  view source on GitHub ↗

////////////////////////////////////////////////////////// function defintion///////////////////////////////////////////

Source from the content-addressed store, hash-verified

33///////////////////////////////////////////////////////////////
34//function defintion///////////////////////////////////////////
35void Menu(accounts oldData[]) {
36 char num = '1';
37 while (num != '0')
38 {
39 system("CLS");
40 cout << "\n 1.Deposit" << endl;
41 cout << "\n 2.Borrow money from bank" << endl;
42 cout << "\n 3.Return money to bank" << endl << endl;
43 cout << "\n If you want to quit from this section please press 0" << endl << endl;
44 num = _getch();
45 switch (num) {
46 case 49:
47 system("CLS");
48 Deposit();
49 oldData[accountNum].balance = ::balance;
50 inputUpgradeData(oldData);
51 break;
52 case 50:
53 system("CLS");
54 Borrow();
55 oldData[accountNum].balance = ::balance;
56 oldData[accountNum].borrowed = ::borrow;
57 inputUpgradeData(oldData);
58 break;
59 case 51:
60 system("CLS");
61 Return();
62 oldData[accountNum].balance = ::balance;
63 oldData[accountNum].borrowed = ::borrow;
64 inputUpgradeData(oldData);
65 break;
66 }
67 }
68 cout << "\n ";
69}
70
71void CheckBalance() {
72 system("CLS");

Callers 1

MainMenuFunction · 0.85

Calls 4

DepositFunction · 0.85
inputUpgradeDataFunction · 0.85
BorrowFunction · 0.85
ReturnFunction · 0.85

Tested by

no test coverage detected