Ooad 3

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 36

Session 7

Dynamic Modeling

Sequence Diagrams
Sequence diagrams are used to model the potential
way the system is used.
A model scenario may be a Use-Case or part of a
Use-Case.
Sequence diagrams can also be used to describe
the logic of a complex operation, function, or
procedure.
Sequence diagrams are also used for analysis and
design purposes.

Conditions and Controls


The notations for conditionals and control
structures are known as interaction frames.
There are a number of mechanisms that do allow
for adding a degree of procedural logic to
diagrams and which come under the heading of
combined fragments.
Some of the fragments available are:

Alternative fragment (denoted "alt") models

if...then...else constructs.
Option fragment (denoted pt") models switch
constructs.
Loop fragment (denoted "loop") models

.
Collaboration Diagrams
Unlike a sequence diagram, a collaboration diagram
shows the relationships among the object roles.
On the other hand, a collaboration diagram does
not show time as a separate dimension, so the
sequence of messages and the concurrent threads
must be determined using sequence numbers.

Sequence diagrams and collaboration


diagrams express similar information, but
show it in different ways.
The former emphasizes the sequence of the
messages sent between objects, and the
latter provides a clearer picture of the
relationships that exist amongst the objects
participating in a use case.

Elements
The elements of collaboration diagrams are:
Object
Link
Message

Session-8
State Machine Diagrams

13

State Machine Diagrams


A state machine diagram models the behavior of
a single object, specifying the sequence of events
that an object goes through during its lifetime in
response to events.
Notation for states

State machine diagrams can have a start point


and several end points. Start, end, terminate are
also known as pseudo-states.

14

Session-9
Object Diagrams

25

Object Diagrams
Object diagrams, also known as instance
diagrams, are useful for representing "real world"
objects and the relationships between them.
An object diagram may be considered a special
case of a class diagram. They are useful in
understanding class diagrams.

26

Relationships
Objects can take part in aggregation,
composition, dependency relationships like class
diagrams also.

31

32

33

Recursive Relationships
Object diagrams are useful in explaining recursive
relationship

34

35

You might also like