Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A mistake of HasQuarterState.java in gumballstate and gumballstatewinner #34

Open
newryu opened this issue Jul 7, 2022 · 0 comments
Open

Comments

@newryu
Copy link

newryu commented Jul 7, 2022

state\gumball\GumballMachine.java
Line 75: "No gumball dispensed" should be "You need to turn the crank"

state\gumballstate\HasQuarterState.java
Line 27: "No gumball dispensed" should be "You need to turn the crank"

state\gumballstatewinner\HasQuarterState.java
Line 33: "No gumball dispensed" should be "You need to turn the crank"

Just check Page 387 in the book, the dispense method when state is HAS_QUARTER

else if (state == HAS_QUARTER) {System.out.println("You need to turn the crank");}

the following warning messages of dispense method when the state is HAS_QUARTER in Chapter 10 need to be the same.

So the message "No gumball dispensed" of HAS_QUARTER state on Page 400, Page 410, Page 422 should be "You need to turn the crank".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant