Thursday, 16 August 2012

BEHAVIORAL MODEL - MOBILE BANK


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 chart diagrams, also referred to as State diagrams, are used to document the various modes ("state") that a class can go through, and the events that cause a state transition. For example, your television can be in the off state, and when the power button is pressed, the television goes into the on state. Pressing the power button yet again causes a state transition from the on state to the off state. In comparison the other behavioral diagrams which model the interaction between multiple classes, State diagrams typically model the transitions within a single class. 


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