////////////////////////////////////////////////////////// function defintion///////////////////////////////////////////
| 33 | /////////////////////////////////////////////////////////////// |
| 34 | //function defintion/////////////////////////////////////////// |
| 35 | void 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 | |
| 71 | void CheckBalance() { |
| 72 | system("CLS"); |
no test coverage detected