Asteele920

Untitled

Jan 25th, 2020
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. *Receive an amount of money from a customer.
  3. *Check that the amount is sensible.
  4. */
  5. Public void insertMoney(int amount)
  6. {
  7.     If (amount <= 0) {
  8.     System.out.PrintIn(“Use a positive amount rather than:+amount);
  9.     }
  10.     Else {
  11.     Balance = balance + amount;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment