Rollerskate Example



Here is an example of how to draw a class diagram and and object diagram to model the following example scenario of people rollerskating.


Here's what we want to model:



Here is what the class diagram could look like:



Now imagine that somewhere in the middle of our computation, the a rollerskating rink has ten skaters, one of whom is named Ellen. Ellen is wearing one green skate and one blue skate. Here is what the object diagram would look like: