State Transition Diagrams: Dynamic Modelling
State Transition Diagrams: Dynamic Modelling
State Transition Diagrams: Dynamic Modelling
Dynamic Modelling
An objects state and behaviour can be
affected by:
Changes to attribute values
Results of operations
Changes of links with other objects
Internal events
External events
2
Three models
Object model:
Static structure of objects in a system and their
relationships.
Contains class diagrams.
dynamic model;
describes aspects that change over time: state
transition diagrams
functional model;
Use Case diagrams
3
Dynamic modelling
Events
states
state diagrams
conditions
operations
4
Events
5
Event classes
8
Characterisations of a state
9
Condition that characterises the
state:
alarm = on,
and
target time <= current time <= target time + 20s
and
button has not been pushed since the target
time
10
Events accepted in the state:
11
State Diagrams
off-hook
Dial tone time-out Time out
do : Sound dial tone do : sound loud beep
digit (n)
digit (n)
time-out
Dialling
Recorded message
Busy tone invalid number
do : Play message
valid number
do : slow busy tone
trunk busy Connecting
do : find connection
number busy
routed
Fast busy tone ringing
do : play fast busy tone do : ring bell
message done
called phone answers
/connect line
Connected
on-hook/
disconnect line called phone hangs up
/disconnect line
Disconnected
Initial/final States
15
State Transition Diagram With
Conditions
Traffic light
16
Operations
Attached to state
Performed in response to the state
Attached to a transition
Performed in response to the event
17
Activities and Actions
18
T
e
e
l
p
ho
n
ec
a
l
o
n
h
-
o
o
kd
Ie
l
o
h
-
f
o
o
k
m
i
t
e
o
-u
t
D
a
i
o
t
l
ne T
m
i
eo
u
t
d
o
S
:
o
un
d
da
i
o
t
l
ned
os
:
o
un
d
o
l
ud
b
e
d
g
i
n
(
t
i
) d
g
i
n
(
t
i
)
m
i
te
o
-
ut
D
a
i
n
i
lg
R
e
co
d
r
ed
m
es
s
a
n
i
v
ad
i
l
n
um
b
er
B
u
s
yo
t
n
e
d
o
P
:a
l
y
me
s
sa
g
e
va
d
i
l
n
um
b
er
d
o
s
:
o
l
w
bu
s
yo
t
n
e
n
u
mb
e
b
ru
s
y
Co
n
n
ec
n
i
t
g
do
n
i
f
:
d
co
n
ne
c
o
i
t
n
r
t
un
k
bu
s
y
o
ru
e
td
F
a
s
b
t
u
s
yo
t
n
e n
i
r
g
n
ig
d
o
a
f
:
s
b
t
us
y
o
tn
ed
o
n
i
r
:
g
be
l m
es
s
a
ge
d
c
ae
l
dp
h
o
ne
a
n
sw
e
r
s
c
/
on
ne
c
n
i
l
t
e
Co
n
n
e
c
e
td
o
n
h
-
oo
k
/
d
s
i
c
on
n
ec
n
i
l
t
e c
a
e
l
dp
h
on
e
h
an
g
su
p
d
/
s
i
c
on
n
ec
n
i
l
t
e
D
s
i
c
on
n
ec
e
t
d
Nesting Diagrams
20
Exercise 1 - Claims
A third party claim arises from an incident that has occurred.
The claim must be reported to the claims office within the
statutory period to be valid. When the claim is reported, the
incident is preferably verified by a member of staff who was
present at the time. The claim is recorded and evaluated. If it is
a trivial claim, the claims assessor checks the claimant for
previous claims and, if there are no or 1 previous claims then a
payment is made and the claim is settled. If there are previous
claims, the claimant will be referred to the courts. More serious
claims may await expert evidence and several different court
hearings. At any stage, the claim may be dropped, or a
payment made without admitting liability. If the claimant is a
minor, the claim must remain on the books until the claimant is
over 21. If a claim is settled by a court, it may be appealed.
During this time, the claim remains open.
Draw a state diagram for a claim.
Claim reported Claim reported
accident not verified
Claim
Accident verified Dropped
Report submitted
Refer to underwriter
Reject Settled
SettlementDisputed Passed on to
underwriter
TimePassedUndisputed
DeleteClaim
Claim rejected
TimePassedUndisputed
22
States of Order
[ [orderline added] ] / Update total
All garments
released
Payment
made
Order
released 23
States of Garment (Garments
system) Marked out for
Garment
finishing
ordered
Material Sewn
ordered
Finished
24