001package headfirst.state.gumball; 002 003public class GumballMachineTestDrive { 004 005 public static void main(String[] args) { 006 GumballMachine gumballMachine = new GumballMachine(5); 007 008 System.out.println(gumballMachine); 009 010 gumballMachine.insertQuarter(); 011 gumballMachine.turnCrank(); 012 013 System.out.println(gumballMachine); 014 015 gumballMachine.insertQuarter(); 016 gumballMachine.ejectQuarter(); 017 gumballMachine.turnCrank(); 018 019 System.out.println(gumballMachine); 020 021 gumballMachine.insertQuarter(); 022 gumballMachine.turnCrank(); 023 gumballMachine.insertQuarter(); 024 gumballMachine.turnCrank(); 025 gumballMachine.ejectQuarter(); 026 027 System.out.println(gumballMachine); 028 029 gumballMachine.insertQuarter(); 030 gumballMachine.insertQuarter(); 031 gumballMachine.turnCrank(); 032 gumballMachine.insertQuarter(); 033 gumballMachine.turnCrank(); 034 gumballMachine.insertQuarter(); 035 gumballMachine.turnCrank(); 036 037 System.out.println(gumballMachine); 038 } 039}