Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upWrong UML in observer #875
Comments
iluwatar
added
enhancement
good first issue
help wanted
web site
labels
Apr 28, 2019
dRadest
referenced a pull request that will
close
this issue
May 2, 2019
Open
Modify UML in Observer Pattern #877
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


andreazube commentedApr 24, 2019
The UML diagram presented in the Observer pattern description is wrong.
The multiplicity between Weather and WeatherType is stated to be 0..1, but that is not the case in the code, since you can't create a Weather object without associating it with a WeatherType (the costructor sets the type to "sunny", timepasses() changes that value, but there is no way to remove the type.
Therefore, the correct cardinality should be just 1.