diff --git a/src/headfirst/designpatterns/proxy/virtualproxy/ImageProxyTestDrive.java b/src/headfirst/designpatterns/proxy/virtualproxy/ImageProxyTestDrive.java index 89957a27..81bb68a4 100755 --- a/src/headfirst/designpatterns/proxy/virtualproxy/ImageProxyTestDrive.java +++ b/src/headfirst/designpatterns/proxy/virtualproxy/ImageProxyTestDrive.java @@ -19,7 +19,7 @@ public ImageProxyTestDrive() throws Exception { albums.put("Buddha Bar","http://images.amazon.com/images/P/B00009XBYK.01.LZZZZZZZ.jpg"); albums.put("Ima","http://images.amazon.com/images/P/B000005IRM.01.LZZZZZZZ.jpg"); albums.put("Karma","http://images.amazon.com/images/P/B000005DCB.01.LZZZZZZZ.gif"); - albums.put("MCMXC A.D.","http://images.amazon.com/images/P/B000002URV.01.LZZZZZZZ.jpg"); + albums.put("MCMXC a.D.","http://images.amazon.com/images/P/B000002URV.01.LZZZZZZZ.jpg"); albums.put("Northern Exposure","http://images.amazon.com/images/P/B000003SFN.01.LZZZZZZZ.jpg"); albums.put("Selected Ambient Works, Vol. 2","http://images.amazon.com/images/P/B000002MNZ.01.LZZZZZZZ.jpg"); diff --git a/src/headfirst/designpatterns/state/gumballstate/GumballMachine.java b/src/headfirst/designpatterns/state/gumballstate/GumballMachine.java index 4b41406a..9650c29b 100755 --- a/src/headfirst/designpatterns/state/gumballstate/GumballMachine.java +++ b/src/headfirst/designpatterns/state/gumballstate/GumballMachine.java @@ -39,7 +39,7 @@ public void turnCrank() { void releaseBall() { System.out.println("A gumball comes rolling out the slot..."); - if (count != 0) { + if (count > 0) { count = count - 1; } } @@ -50,7 +50,7 @@ int getCount() { void refill(int count) { this.count += count; - System.out.println("The gumball machine was just refilled; it's new count is: " + this.count); + System.out.println("The gumball machine was just refilled; its new count is: " + this.count); state.refill(); } diff --git a/src/headfirst/designpatterns/state/gumballstatewinner/GumballMachine.java b/src/headfirst/designpatterns/state/gumballstatewinner/GumballMachine.java index 94b1463c..499027cb 100755 --- a/src/headfirst/designpatterns/state/gumballstatewinner/GumballMachine.java +++ b/src/headfirst/designpatterns/state/gumballstatewinner/GumballMachine.java @@ -43,7 +43,7 @@ void setState(State state) { void releaseBall() { System.out.println("A gumball comes rolling out the slot..."); - if (count != 0) { + if (count > 0) { count = count - 1; } } @@ -54,7 +54,7 @@ int getCount() { void refill(int count) { this.count += count; - System.out.println("The gumball machine was just refilled; it's new count is: " + this.count); + System.out.println("The gumball machine was just refilled; its new count is: " + this.count); state.refill(); }