UCS602 AnalysisModelling
UCS602 AnalysisModelling
6/e
Chapter 8
Analysis Modeling
copyright 1996, 2001, 2005
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Requirements Analysis
Requirements analysis
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
user scenarios,
functional activities,
problem classes and their relationships,
system and class behavior, and
the flow of data as it is transformed.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
A Bridge
system
description
analysis
model
design
model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Rules of Thumb
The model should focus on requirements that are visible within the
problem or business domain. The level of abstraction should be
relatively high.
Each element of the analysis model should add to an overall
understanding of software requirements and provide insight into
the information domain, function and behavior of the system.
Delay consideration of infrastructure and other non-functional
models until design.
Minimize coupling throughout the system.
Be certain that the analysis model provides value to all
stakeholders.
Keep the model as simple as it can be.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Domain Analysis
Software domain analysis is the identification, analysis,
and specification of common requirements from a
specific application domain, typically for reuse on
multiple projects within that application domain . . .
[Object-oriented domain analysis is] the identification,
analysis, and specification of common, reusable
capabilities within a specific application domain, in
terms of common objects, classes, subassemblies, and
frameworks . . .
Donald Firesmith
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Domain Analysis
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Data Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
Typical Objects
external entities (printer, user, sensor)
things (e.g, reports, displays, signals)
occurrences or events (e.g., interrupt, alarm)
roles (e.g., manager, engineer, salesperson)
(e.g., division, team)
organizational units
places (e.g., manufacturing floor)
structures (e.g., employee record)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
10
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
11
What is a Relationship?
relationship indicates connectedness;
a "fact" that must be "remembered"
by the system and cannot or is not computed
or derived mechanically
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
12
ERD Notation
One common form:
object1
(0, m)
relationship
(1, 1)
object 2
attribute
object1
(0, m)
(1, 1)
object 2
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
13
Building an ERD
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
14
(1,1)
places
(1,m)
request
for service
(1,1)
standard
task table
(1,1)
selected
from
generates
work
(1,w) tasks
materials
(1,w)
(1,i)
(1,n)
work
order
(1,1)
(1,1)
consists
of
lists
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
15
Object-Oriented Concepts
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
16
Classes
template
generalized description
blueprint ... describing a collection of
similar items
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
17
Building a Class
class name
attributes:
operations
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
18
What is a Class?
occurrences
things
roles
organizational units
places
structures
external entities
class name
attributes:
operations:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
19
Encapsulation/Hiding
The object encapsulates
both data and the logical
procedures required to
manipulate the data
method
method
#2
#1
data
method
#3
method
#6
method
#5
method
#4
20
Class Hierarchy
PieceOfFurniture (superclass)
Table
Chair
Desk
Chable"
subclasses of the
instances of Chair
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
21
Methods
(Operations, Services)
An executable procedure that is
encapsulated in a class and is designed
to operate on one or more data attributes
that are defined as part of the class.
A method is invoked
via message passing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
22
Scenario-Based Modeling
[Use-cases] are simply an aid to defining what exists
outside the system (actors) and what should be
performed by the system (use-cases). Ivar Jacobson
(1) What should we write about?
(2) How much should we write about it?
(3) How detailed should we make our description?
(4) How should we organize the description?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
23
Use-Cases
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
24
Developing a Use-Case
What are the main tasks or functions that are performed by the
actor?
What system information will the the actor acquire, produce or
change?
Will the actor have to inform the system about changes in the
external environment?
What information does the actor desire from the system?
Does the actor wish to be informed about unexpected changes?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
25
Use-Case Diagram
SafeHome
Access camera
surveillance via the
Internet
cameras
Configure SafeHome
system parameters
homeowner
Set alarm
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
26
Activity Diagram
Supplements the use-case by providing a diagrammatic
representation of procedural flow
enter password
and user ID
select surveillanc e
t humbnail views
no input
t r ies r emain
select specific
camera - thumbnails
prompt for
another view
exit t his f unct ion
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
27
Swimlane Diagrams
Allows the modeler to represent the flow of activities described by the use-case and at the
same time indicate which actor (if there are multiple actors involved in a specific use-case)
or analysis class has responsibility for the action described by an activity rectangle
h o m e o wn e r
c a m e ra
i n t e rf a c e
enter password
and user ID
valid p asswo rd s/ ID
in valid
p asswo rd s/ ID
in p u t t ries
remain
select surveillance
n o in p u t
t ries remain
t h u mb nail views
select specific
camera - thumbnails
generate video
output
view camera output
in labelled window
prompt for
another view
exit t his
f u n ct io n
see
an o t h er
camera
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
28
Flow-Oriented Modeling
Represents how data objects are transformed at they
move through the system
A data flow diagram (DFD) is the diagrammatic form that
is used
Considered by many to be an old school approach, floworiented modeling continues to provide a view of the
system that is uniqueit should be used to supplement
other analysis model elements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
29
input
computer
based
system
output
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
30
process
data flow
data store
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
31
External Entity
A producer or consumer of data
Examples: a person, a device, a sensor
Another example: computer-based
system
Data must always originate somewhere
and must always be sent to something
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
32
Process
A data transformer (changes input
to output)
Examples: compute taxes, determine area,
format report, display graph
Data must always be processed in some
way to achieve system function
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
33
Data Flow
Data flows through a system, beginning
as input and be transformed into output.
base
height
compute
triangle
area
area
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
34
Data Stores
Data is often stored for later use.
sensor #
report required
look-up
sensor
data
sensor number
sensor #, type,
location, age
type,
location, age
sensor data
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
35
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
36
Constructing a DFDI
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
37
video
source
processing
request
digital
video
processor
requested
video
signal
monitor
NTSC
video signal
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
38
Constructing a DFDII
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
39
p1
c
d
level 1
p2
level 0
f
p4
p3
p5
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
40
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
41
PSPEC
narrative
pseudocode (PDL)
equations
tables
diagrams and/or charts
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
42
analysis model
Maps into
design model
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
43
Context-level diagram
Level 1 diagram
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
44
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
45
Grammatical Parse
The SafeHome security function enables the homeowner to configure the security system
when it is installed, monitors all sensors connected to the security system, and interacts with
the homeowner through the Internet, a PC, or a control panel.
During installation, the SafeHome PC is used to program and configure the system. Each
sensor is assigned a number and type, a master password is programmed for arming and
disarming the system, and telephone number(s) are input for dialing when a sensor event
occurs.
When a sensor event is recognized, the software invokes an audible alarm attached to the
system. After a delay time that is specified by the homeowner during system configuration
activities, the software dials a telephone number of a monitoring service, provides
information about the location, reporting the nature of the event that has been detected. The
telephone number will be redialed every 20 seconds until a telephone connection is obtained.
The homeowner receives security information via a control panel, the PC, or a browser,
collectively called an interface. The interface displays prompting messages and system status
information on the control panel, the PC, or the browser window. Homeowner interaction
takes the following form
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
46
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
47
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
48
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
49
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
50
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
51
combinatorial spec
decision tables
activation tables
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
52
Class-Based Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
53
Grammatical Parse
The Safehome security function enables the homeowner to
configure the security system when it is installed,
monitors all sensors connected to the security system, and
interacts with the homeowner through the Internet, a PC,
or a control panel.
During installation, the Safehome PC is used to program and
configure the system. Each sensor is assigned a number
and type, a master password is programmed for arming
and disarming the system, and telephone number(s) are
input for dialing when a sensor event occurs.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
54
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
55
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
56
Potential classes
Safehome security
Homeowner
security system
Sensors
Internet
PC
control panel
Number
Type
master password
telephone number(s)
sensor event
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
57
Analysis Classes
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
58
Selecting ClassesCriteria
classes maybe useful if
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
59
Homeowner
PC
Internet
Sensors
security system
Accepted
?
?
control panel.
Accepted: al apply
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
60
Installation
Number, Type
Rejected, 3 fails
sensor event
rejected , 3 fails
telephone number(s)
master password
rejected
Audible alarm
Accepted:2,3,4,5,6 apply
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
61
Class name
Class Diagram
System
Identification inf
Alarm respose inf
Activation/deactivation inf
systemID
verificationPhoneNumber
systemStatus
delayTime
telephoneNumber
masterPassword
temporaryPassword
numberTries
program()
display()
reset()
query()
modify()
call()
attributes
operations
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
62
Class Diagram
FloorPlan
type
name
outsideDimensions
determineType ( )
positionFloorplan
scale( )
change color( )
is placed within
is part of
Camera
Wall
type
ID
location
fieldV iew
panA ngle
ZoomSetting
type
wallDimensions
determineType ( )
computeDimensions ( )
determineType ()
translateLocation ()
displayID()
displayV iew()
displayZoom()
is used to build
is used to build
is used to build
WallSegment
type
startCoordinates
stopCoordinates
nextWallSement
determineType ( )
draw( )
Window
Door
type
startCoordinates
stopCoordinates
nextWindow
type
startCoordinates
stopCoordinates
nextDoor
determineType ( )
draw( )
determineType ( )
draw( )
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
63
CRC Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
64
CRC Modeling
Class:
Class:
Description:
Class:
Description:
Class:FloorPlan
Description:
Responsibility:
Description:
Responsibility:
Responsibility:
Responsibility:
Collaborator:
Collaborator:
Collaborator:
Collaborator:
Wall
C amera
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
65
Class Types
Entity classes, also called model or business classes, are extracted directly
from the statement of the problem (e.g., FloorPlan and Sensor).
(persist)
Boundary classes are used to create the interface (e.g., interactive screen
or printed reports) that the user sees and interacts with as the software
is used. (like cameraWindow)
Controller classes manage a unit of work from start to finish (design
time). That is, controller classes can be designed to manage
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
66
Responsibilities
How to allocate responsibilities to classes:
System intelligence should be distributed across classes to
best address the needs of the problem
Each responsibility should be stated as generally as
possible (high enough in hierarchy)
Information and the behavior related to it should reside
within the same class (encapsulation)
Information about one thing should be localized with a
single class, not distributed across multiple classes.
Responsibilities should be shared among related classes,
when appropriate.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
67
Collaborations
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
68
PlayerHead
PlayerBody
PlayerArms
PlayerLegs
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
69
All participants in the review (of the CRC model) are given a subset of the CRC model index
cards.
All use-case scenarios (and corresponding use-case diagrams) should be organized into
categories.
The review leader reads the use-case deliberately .
As the review leader comes to a named object, she passes a token to the person holding the
corresponding class index card.
When the token is passed, the holder of the class card is asked to describe the responsibilities
noted on the card.
Cards that collaborate should be separated (i.e., no reviewer should have two cards that collaborate).
The group determines whether one (or more) of the responsibilities satisfies the use-case
requirement.
If the responsibilities and collaborations noted on the index cards cannot accommodate the
use-case, modifications are made to the cards .
This may include the definition of new classes (and corresponding CRC index cards) or the
specification of new or revised responsibilities or collaborations on existing cards.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
70
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
71
Association - Multiplicity
Wall
1
is used to build
1
is used to build
1..*
WallSegment
Window
0..*
Door
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
72
Dependencies
Camera
DisplayWindow
<<access>>
{password}
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
73
Analysis Packages
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
74
Analysis Packages
package name
Environment
+Tree
+Landscape
+Road
+Wall
+Bridge
+Building
+VisualEffect
+Scene
RulesOfTheGame
+RulesOfMovement
+ConstraintsOnAction
Characters
+Player
+Protagonist
+Antagonist
+SupportingRole
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
75
Behavioral Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
76
State Representations
the state of each class as the system performs its function and
the state of the system as observed from the outside as the
system performs its function
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
77
locked
password = incorrect
& numberOfTries < maxTries
key hit
comparing
reading
password
ent ered
do: validatePassword
password = correct
select ing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
78
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
79
Behavioral Modeling
indicate event
indicate action
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
80
Sequence Diagram
cont rol panel
homeowner
syst em
ready
sensors
sensors
syst em
reading
comparing
request lookup
result
password = correct
locked
select ing
act ivat ion successful
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
81
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
82
Specification Guidelines
use a layered format that provides increasing detail
as the "layers" deepen
use consistent graphical notation and apply textual
terms consistently (stay away from aliases)
be sure to define all acronyms
be sure to include a table of contents; ideally,
include an index and/or a glossary
write in a simple, unambiguous style (see "editing
suggestions" on the following pages)
always put yourself in the reader's position, "Would
I be able to understand this if I wasn't intimately
familiar with the system?"
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
83
Specification Guidelines
Be on the lookout for persuasive connectors, ask why?
keys: certainly, therefore, clearly, obviously, it follows that ...
Watch out for vague terms
keys: some, sometimes, often, usually,ordinarily, most, mostly ...
When lists are given, but not completed, be sure all items are understood
keys: etc., and so forth, and so on, such as
Be sure stated ranges don't contain unstated assumptions
e.g., Valid codes range from 10 to 100. Integer? Real? Hex?
Beware of vague verbs such as handled, rejected, processed, ...
Beware "passive voice" statements
e.g., The parameters are initialized. By what?
Beware "dangling" pronouns
e.g., The I/O module communicated with the data validation module and
its contol flag is set. Whose control flag?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
84
Specification Guidelines
When a term is explicitly defined in one place, try
substituting the definition forother occurrences of the term
When a structure is described in words, draw a picture
When a structure is described with a picture, try to redraw
the picture to emphasize different elements of the structure
When symbolic equations are used, try expressing their
meaning in words
When a calculation is specified, work at least two
examples
Look for statements that imply certainty, then ask for proof
keys; always, every, all, none, never
Search behind certainty statementsbe sure restrictions
or limitations are realistic
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
85
Excercises
7.1 a,b
8.6a, 8.7a, 8.9a, 8.12 8.10,8.14,8.15,8.18
These courseware materials are to be used in conjunction with Software Engineering: A Practitioners Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright 1996, 2001, 2005
86