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

Observer pattern code seem to be incorrect with example output #13

Open
tuancode opened this issue Aug 26, 2017 · 0 comments
Open

Observer pattern code seem to be incorrect with example output #13

tuancode opened this issue Aug 26, 2017 · 0 comments

Comments

@tuancode
Copy link

Hi,

I bought the design pattern book and practice it. Then, I recognize a small mistake and want to clarify it, also want to support to help book better. From the book, page 60 and 61, we will have output as below:

Current conditions: 82.0F degrees and 70.0% humidity
Avg/Max/Min temperature = 81.0/82.0/80.0
...
Follow source from github, the output should be:

Current conditions: 82.0F degrees and 70.0% humidity
Avg/Max/Min temperature = 82.0/82.0/82.0
...

And

Current conditions: 78.0F degrees and 90.0% humidity
Avg/Max/Min temperature = 80.0/82.0/78.0
Forecast: More of the same
...
Follow source from github, the output should be:

Current conditions: 78.0F degrees and 90.0% humidity
Avg/Max/Min temperature = 78.0/78.0/78.0
Forecast: Watch out for cooler, rainy weather
...

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