|
@ -1,23 +1,28 @@ |
|
|
#include "customerMenu.h" |
|
|
#include "customerMenu.h" |
|
|
|
|
|
#include "sendMoney.h" |
|
|
|
|
|
#include "withdrawMoney.h" |
|
|
|
|
|
#include "depositMoney.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int customerChoiceForMenuItem(int numberOfMenuItem, unsigned int *ptr) |
|
|
int customerChoiceForMenuItem(int numberOfMenuItem, unsigned int *ptr) |
|
|
{ |
|
|
{ |
|
|
int returnStatus = 0; |
|
|
int returnStatus = 0; |
|
|
|
|
|
int ID = *ptr; |
|
|
switch(numberOfMenuItem){ |
|
|
switch(numberOfMenuItem){ |
|
|
case 1: |
|
|
case 1: |
|
|
puts("You have chosen to send money.\n"); |
|
|
puts("You have chosen to send money.\n"); |
|
|
returnStatus = 1; |
|
|
returnStatus = 1; |
|
|
//call sendMoney(); |
|
|
|
|
|
|
|
|
sendMoney(ID); |
|
|
break; |
|
|
break; |
|
|
case 2: |
|
|
case 2: |
|
|
puts("You have chosen to withdraw money.\n"); |
|
|
puts("You have chosen to withdraw money.\n"); |
|
|
returnStatus = 2; |
|
|
returnStatus = 2; |
|
|
//call withDrawMoney(); |
|
|
|
|
|
|
|
|
withdraw(ID); |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
puts("You have chosen to deposit money.\n"); |
|
|
puts("You have chosen to deposit money.\n"); |
|
|
returnStatus = 3; |
|
|
returnStatus = 3; |
|
|
//call depositMoney(); |
|
|
|
|
|
|
|
|
depositMoney(ID); |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
puts("You have chosen to request a loan.\n"); |
|
|
puts("You have chosen to request a loan.\n"); |
|
|