Consider the example of a verterinary system. Animals served, such as dogs and birds, are tracked along with their owners. The following diagram models a potential solution. Since dogs and birds are "a kind of" animal, we use a Generalization relationship.
To validate your model, you can apply real-world data into instances of the classes. In fact, there is a diagram for precisely this task, the Object Diagram.
BEHAVIORAL MODEL:
State chart Diagrams
State | The State notation marks a mode of the entity, and is indicated using a rectangle with rounded corners, and the state name written inside. | |
Transition | A Transition marks the changing of the object State, caused by an event. The notation for a Transition is an arrow, with the Event Name written above, below, or alongside the arrow. | |
Initial State | The Initial State is the state of an object before any transitions. For objects, this could be the state when instantiated. The Initial State is marked using a solid circle. Only one initial state is allowed on a diagram. | |
Final State | End States mark the destruction of the object whose state we are modeling. These states are drawn using a solid circle with a surrounding circle. |
Here is an example State Diagram that models that status of a user's account in a Bug Tracker system:
No comments:
Post a Comment