Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *Receive an amount of money from a customer.
- *Check that the amount is sensible.
- */
- Public void insertMoney(int amount)
- {
- If (amount <= 0) {
- System.out.PrintIn(“Use a positive amount rather than: “ +amount);
- }
- Else {
- Balance = balance + amount;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment