Chapter 12
Chapter 12
A picture is worth
1024 words
Objectives
• Purpose
– DFDs provide a big-picture view of how data moves through a
system, which other models don’t show well
– A gives context to the functional requirements regarding how
the user performs specific tasks.
– DFDs can be used as a technique to identify missing data
requirements
Dataflow diagram: example
Swimlane diagram
• Purpose:
– Provide a way to represent the steps involved in a business
process or the operations of a proposed software system.
– They are a variation of flowcharts, subdivided into visual
subcomponents called lanes. The lanes can represent different
systems or actors that execute the steps in the process.
– Swimlane diagrams are most commonly used to show business
processes, workflows, or system and user interactions.
– They are similar to UML activity diagrams. Swimlane diagrams
are sometimes called cross-functional diagrams.
Swimlane example
State-transition diagram
and state table
Transition
State State
Pseudo States
Initial State
• Initial state
– The state entered when an
State1
object is created
– Mandatory, can only have one
initial state
• Choice Choice
– Dynamic evaluation of
subsequent guard conditions
– Only first segment has a trigger
Final State
• Final state
– Indicates the object’s end State2
of life
– Optional, may have more than
one
Identify and Define the
States
• Significant, dynamic attributes
The maximum number of students per course offering is 10
numStudents < 10 numStudents > = 10
Open Closed
0..1
Assigned Unassigned
0..*
CourseOffering
Identify the Events
CourseOffering 0..*
Professor
+ addProfessor() 0..1
+ removeProfessor()
Events: addProfessor,
removeProfessor
Identify the Transitions
• For each state, determine what events cause
transitions to what states, including guard
conditions, when needed
• Transitions describe what happens in response to
the receipt of an event
CourseOffering 0..*
0..1 Professor
+ addProfessor()
+ removeProfessor()
Unassigned
removeProfessor addProfessor
Assigned
Add Activities
• Entry StateA
entered
• Do
– Ongoing execution
StateB StateC
Do/anActivity Exit/someAction
• Exit
– Executed when the state is
exited
ate Machine
Example: State machine
addStudent / numStudents = numStudents + 1
/ numStudents = 0 removeStudent [numStudents >0]/ numStudents = numStudents - 1
Unassigned
closeRegistration
cancel Canceled
addProfessor
do/ Send cancellation notices
close
removeProfessor cancel
[ numStudents = 10 ]
cancel
Full
close Canceled
Unassigned do/ Send cancellation notices
cancel
cancel
substate
Full
close[ numStudents < 3 ]
remove a professor
[ numStudents = 10 ] close
add a professor
closeRegistration [ has Professor assigned ]
CourseOffering
- numStudents
+ addStudent()
[numStudents<10] [numStudents>=10]
State table example
Several diagrams
for self-studying
• Dialog map
• Decision tables and decision trees
• Event-response tables
A few words about UML diagrams
1: // create schedule( )
2: // get course offerings( )
Create a new 3: // get course offerings(forSemester)
schedule
4: // get course offerings( )
A blank schedule
is displayed for the 6: // display blank schedule( )
students to select
offerings
<<entity>> <<entity>>
RegisterForCoursesForm CourseCatalogSystem
Example: Finding Control
•
Classes
In general, identify one control class per use case.
– As analysis continues, a complex use case’s control class may evolve
into more than one class
RegistrationController
Modeling on agile projects