state machines Flashcards
state
condition the object stays in
trigger
the event that causes the transition
guard
a conditional statement that must be true for an event to occur
event
action that happens due to the transition
transition
moving from one state to the other
may have a trigger guard and effect
what are two other dynamic uml diagrams
activity diagram
sequence diagram
activity diagram
a walk through from the user pov that models the flow of control
sequence diagram
specify interactions within the system
time based approach showing which components are active and when
also shows when components communicate with each other and any bottlenecks
what do state machines do
model the behaviour of a thing and specifies the state it goes through during its lifetime in response to an event
what are some examples of the thing that state machines model the behaviour of
system/subsystem
instance of a class
what is the state of a class
its attributes
what are some benefits of state machines
model what happens when an object gets a message
include events that lead to object changing state
helps test and maintain systems
useful for systems with lots of dynamic behaviour e.g. control and communication systems
what are the 3 event types
signal, call and time
signal event
real time receipt of a signal
call event
operation call