001package headfirst.proxy.gumballmonitor; 002 003public class GumballMonitor { 004 GumballMachine machine; 005 006 public GumballMonitor(GumballMachine machine) { 007 this.machine = machine; 008 } 009 010 public void report() { 011 System.out.println("Gumball Machine: " + machine.getLocation()); 012 System.out.println("Current inventory: " + machine.getCount() + " gumballs"); 013 System.out.println("Current state: " + machine.getState()); 014 } 015}