The deposit command allows a user to deposit money into an existing account.
The cashier must ask for the email address of the account, the password and the
amount to be deposited. If the password is correct, the money will be deposited into
the account. If the deposit could not be completed, the cashier prints out a message
informing the user. If the deposit is completed successfully, the cashier responds
with “Thank you for using the bank”.
it doesn't come up with the print messages whilst testing itCode:
private void makeDeposit(InputReader reader)
String email = reader.getText("enter email address: ");
String password = reader.getText("enter password: ");
int amount = reader.getNumber("enter deposit amount: ");
Account account = (Account)accounts.get(email);
boolean success = account.deposit(amount);
System.out.println("Thank you for using the bank");
System.out.println("Unable to deposit to your account");
can anyone see where its gone wrong?