Guest User

Untitled

a guest
Jun 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. if (userAction = withdraw)
  2. {
  3. double balance = Account.getBalance();
  4. System.out.println ("Bank balance is " + balance);
  5. double newbalance = balance - 100; // the user withdraw $100
  6. Account.setBalance (newBalance); // the balance must be updated to the new balance
  7. balance = Account.getBalance(); // get the new balance
  8. System.out.println ("Your new balance is " + balance);
  9. }
Add Comment
Please, Sign In to add comment