Copyright W. Howden 2 State Models • Components – States: a condition of an object – Events: a state changing occurrence – Transitions: from one state to the next, occur when the associated event occurs

Copyright W. Howden 8 State Model Representation • Graphical: useful for small systems • Tables • Better for larger models, easier to build up incrementally • Event/state table • For state x in row 1 column j, if there is a state y in row i column j, the event in row i column 1 causes a transition from state x to state y

State Models and Class Behavior Description • Class instance/object states • different combinations of class variable values correspond to different object states • abstract states correspond to sets of combinations of values • A class instance may behave differently depending on what (abstract) state it is in Copyright W. Howden 10

Modes of Behavior – Stack Example • Following diagram has three abstract states – empty, partial and full • State diagram indicates that the mode of behavior for the stack is different depending

This
preview
has intentionally blurred sections.
Sign up to view the full version.