"
A hermit lives in a cave. The cave's location within the world is determined by x, y & z coordinates. The hermit's name is Freeda and she is 100 years old. Many animals also live in the cave and they can talk. All of the animals have a first name & age. There are bats which fly & screech & there are lizards that run, hide & sing."
Below is my diagram for the above scenario, Basically my print screen is broken so this is a tad bit outdated, namely the
return types aren't listed for the 'getters' but its pretty obvious anyway.
Good blog, good demonstration of your learning.
ReplyDeleteHave a look at the solution diagram https://docs.google.com/Doc?docid=0AfhGbN8bm2yEZGZ2eHF0ZGRfMTY2NWR6ZHR2cWpz&hl=en Cave has-a Animal - whether it is a Bat or Lizard is irrelevant in this diagram. We always link to the most generalised type.
Enjoy the break!