You are on page 1of 8

Collaboration Diagrams

• Essentially an object diagram that shows


• Message passing relationships
• Instead associations
• Emphasize
• The flow of messages among objects
• Rather than timing and ordering of messages

1
Collaboration Diagram Syntax

AN ACTOR

AN OBJECT
anObject:aClass

AN ASSOCIATION

A MESSAGE aMessage()

2
Behavioral State Machines
• Some objects may change states often
• Some may change state and never change
back
• Patient: new  current  former
• This is seen in the cells of the CRUD matrix

3
Behavioral State Machines
• The behavioral state machine is a dynamic
model that shows this
• The behavioral state machine shows
• The different states of an object
• The events
• That cause the object to change from one state to
another

4
Components of Statechart Diagrams
• States
• Determined by the values of the attributes
• Events
• Changes the state of an object
• e.g. changes the values of attributes

5
Components of Statechart Diagrams
• Transitions
• Movement of an object from one state to another
• Often has a guard condition
• Actions
• Atomic process, takes "zero time"
• Activities
• Non-atomic, take a long time, can be started and
stopped

6
Statechart Diagram Syntax

A STATE aState
AN INITIAL STATE

A FINAL STATE

AN EVENT anEvent

A TRANSITION

7
Building Behavioral State Machine Diagrams
• Set the context
• Identify
• Initial state
• Final state
• All stable states
• Determine the order in which the object will pass
through stable states
• Identify the events, actions, and guard conditions
associated with the transitions
• Validate the diagram

You might also like