06Analysis-Part2

06Analysis-Part2 - COMP 211 I NTRODUC ON TO TI S OFTWARE...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 1 SYSTEM ANALYSIS SYSTEM ANALYSIS Part 2 Part 2 COMP 211 INTRODUCTION TO SOFTWARE ENGINEERING
Background image of page 1

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

View Full DocumentRight Arrow Icon
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 2 SPECIFYING OBJECT BEHAVIOR — OBJECT STATES SPECIFYING OBJECT BEHAVIOR — OBJECT STATES [2.4.4; 5.4.7] A statechart diagram describes the behavior inside an object what an object does when it receives a message a statechart diagram is a directed graph that shows: the states of a single object ( nodes ) the events or messages that cause state changes ( arcs ) the actions that result from a state change shows all the messages that an object can send and receive describes all the possible states an object can get into during its life time drawn for a single class to show the lifetime behavior of a single object
Background image of page 2
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 3 A STATECHART DIAGRAM — COURSEOFFERING A STATECHART DIAGRAM — COURSEOFFERING Initialization Open Closed Canceled addStudent/set #enrolled=0 ^CourseRoster.Create [#enrolled=10] addStudent [#enrolled<10] cancel ^CourseRoster.Delete semesterStarted
Background image of page 3

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

View Full DocumentRight Arrow Icon
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 4 STATECHART DIAGRAMS — STATES STATECHART DIAGRAMS — STATES a time during the life of an object when it satisfies some condition , performs some action or waits for an event has duration may be characterized by: value of one or more attributes of the class (e.g., CourseOffering object can be open or closed based on #enrolled attribute) existence of a link to another object (e.g., ProfessorInfo object may be teaching or not based on existence of a link to a CourseOffering object) the interval between two messages received by an object typically represents a state can discover object states from sequence diagrams
Background image of page 4
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 5 STATECHART DIAGRAMS — SPECIAL STATES STATECHART DIAGRAMS — SPECIAL STATES start state each diagram must have one and only one start state stop state each diagram can have multiple stop states states may be named unnamed states are referred to as anonymous states
Background image of page 5

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

View Full DocumentRight Arrow Icon
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 6 STATECHART DIAGRAMS — TRANSITIONS STATECHART DIAGRAMS — TRANSITIONS a change of state from an originating state ( source state ) to a successor state ( target state ) source and target states may be the same state transitions take zero time and cannot be interrupted trigger - the (implicit) event that causes the transition to occur an event triggers a transition; the transition is said to fire transition adornments (all are optional): event signature –> event name plus optional parameters guard condition –> Boolean expression which must be true action –> atomic procedural expression executed when transition fires message sending –> to one or more objects
Background image of page 6
COMP 211 COMP 211 SYSTEM ANALYSIS SYSTEM ANALYSIS 7 STATECHART DIAGRAMS — EVENTS
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 57

06Analysis-Part2 - COMP 211 I NTRODUC ON TO TI S OFTWARE...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online