engineering quality software. today o state diagrams jerry kotuba syst30009-engineering quality...

Post on 19-Jan-2016

221 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Lesson10Engineering Quality Software

Agenda Today

o State Diagrams

Jerry KotubaSYST30009-Engineering Quality

Software2

The Big Picture

Jerry Kotuba Object Oriented Methods 3

Learning outcomes 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

Focus so far… Objects within the business domain (i.e., the

context diagram)o Entity objects

Other objectso Interface objects…user access to the systemo Control objects…application or business rule logic

Jerry Kotuba Object Oriented Methods 5

State chart Diagrams Models the dynamic aspects of a system as it

moves from state to state

Jerry Kotuba Object Oriented Methods 6

Printer Example -Illustration

Jerry Kotuba Object Oriented Methods 7

Object States and the State chart Diagram

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

Notation for Statechart Diagram

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

System Architect Tools

Jerry Kotuba Object Oriented Methods 10

Substates state diagram exploded into lower levels states can be exploded into substates

Jerry Kotuba Object Oriented Methods 11

Printer Example –Illustration 2

Jerry Kotuba Object Oriented Methods 12

Your turn… SLATE- Week08

o Cell Phone Exercise

Jerry Kotuba Object Oriented Methods 13

Rules for Developing Statecharts

[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

Rules for Developing Statecharts (continued)

[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

Assignment SLATE – Week08

o ICE-06

Jerry Kotuba Object Oriented Methods 16

Other Examples

Jerry Kotuba Object Oriented Methods 17

Event

something that happens at a certain point in time

important occurrence that triggers a state transitiono i.e. place an order,

register for class, apply for loan, hire new employee

An event is considered to be instantaneous

Transition

must be named after the event

may include the following:o [guard condition]

• shown in square brackets

o /action expression• action specified

after the / slasho parameters of the

event• i.e. 3 month

timeframe

State Diagram for Student Registration

Nested State Diagram forMatriculated State of Student Object

Nested States And Concurrency

Concurrency: condition of being in more than one state at a time

Two modes of representationo Use synchronization bars and concurrent pathso Nest low-level states inside higher-level states

Higher-level states also called composite stateso Complex structure of sets of states and

transitions o Represent a higher level of abstraction

Jerry Kotuba Object Oriented Methods 23

For Next Class Read text What comes next?

o Complete state chartso Begin Sequence Diagrams

Jerry Kotuba Object Oriented Methods 24

top related