Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public class SoldOutState implements State {
  2. private GumballMachine machine;
  3.  
  4. public SoldOutState(GumballMachine machine) {
  5. this.machine = machine;
  6. }
  7.  
  8. public void insertQuarter() {
  9. System.out.println("Sold out!");
  10. }
  11. public void ejectQuarter() {
  12. System.out.println("Can't eject, nothing inserted");
  13. }
  14. public void turnCrank() {
  15. System.out.println("Sold out!");
  16. }
  17. public void dispense() {
  18. System.out.println("Sold out!");
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement