Engineering Quality Software

advertisement


Engineering Quality Software

Today
o State Diagrams
Jerry Kotuba
SYST30009-Engineering Quality
Software
2
Jerry Kotuba
Object Oriented Methods
3


Learn how to construct a state chart of an object.
Learn how to discover operations (behaviors) for the classes
we found by studying object life cycles.
Jerry Kotuba
Object Oriented Methods
4

Objects within the business domain (i.e., the context
diagram)
o Entity objects

Other objects
o Interface objects…user access to the system
o Control objects…application or business rule logic
Jerry Kotuba
Object Oriented Methods
5

Models the dynamic aspects of a system as it moves from
state to state
Jerry Kotuba
Object Oriented Methods
6
Jerry Kotuba
Object Oriented Methods
7
Lifetimes and Life Cycles
 Events and States
 Transitions
 Actions and Activities
 The Statechart Diagram
 Object Lifecycles on the Statechart Diagram

Jerry Kotuba
Object Oriented Methods
8
Symbol
Purpose
An object’s current state (status)
Denotes the beginning of state chart flow
Arrow indicates the direction of transition from origin
to destination state.
Indicates terminal state of an object.
Transition /
name
[Guard]
/Action
Transition Label
Jerry Kotuba
Object Oriented Methods
10


state diagram exploded into lower levels
states can be exploded into substates
Jerry Kotuba
Object Oriented Methods
11
Jerry Kotuba
Object Oriented Methods
12

SLATE- Week08
o Cell Phone Exercise
Jerry Kotuba
Object Oriented Methods
13

[1] Select the classes that will require statecharts

[2] List all the status conditions for each group

[3] Specify transitions that cause object to leave the
identified state

[4] Sequence state-transition combinations in correct
order
Jerry Kotuba
Object Oriented Methods
14

[5] Identify concurrent paths.

[6] Look for additional transitions

[7] Expand each transition as appropriate

[8] Review and test each statechart
Jerry Kotuba
Object Oriented Methods
15

SLATE – Week08
o ICE-06
Jerry Kotuba
Object Oriented Methods
16
Jerry Kotuba
Object Oriented Methods
17


something that happens at a
certain point in time
important occurrence that triggers
a state transition
o i.e. place an order, register for
class, apply for loan, hire new
employee

An event is considered to be
instantaneous


must be named after the
event
may include the following:
o [guard condition]
• shown in square
brackets
o /action expression
• action specified after
the / slash
o parameters of the event
• i.e. 3 month timeframe

Concurrency: condition of being in more than one
state at a time

Two modes of representation
o Use synchronization bars and concurrent paths
o Nest low-level states inside higher-level states

Higher-level states also called composite states
o Complex structure of sets of states and transitions
o Represent a higher level of abstraction
Jerry Kotuba
Object Oriented Methods
23


Read text
What comes next?
o Complete state charts
o Begin Sequence Diagrams
Jerry Kotuba
Object Oriented Methods
24
Download