UNIT 2
UNIT 2
6/e
Chapter 7
Requirements Engineering
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 1
Requirements Engineering-I
Inception—ask a set of questions that establish …
basic understanding of the problem
the people who want a solution
the nature of the solution that is desired, and
the effectiveness of preliminary communication and collaboration
between the customer and the developer
Elicitation—elicit requirements from all stakeholders
Elaboration—create an analysis model that identifies data, function
and behavioral requirements
Negotiation—agree on a deliverable system that is realistic for
developers and customers
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 2
Requirements Engineering-II
Specification—can be any one (or more) of the following:
A written document
A set of models
A formal mathematical
A collection of user scenarios (use-cases)
A prototype
Validation—a review mechanism that looks for
errors in content or interpretation
areas where clarification may be required
missing information
inconsistencies (a major problem when large products or systems are
engineered)
conflicting or unrealistic (unachievable) requirements.
Requirements management
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 3
Inception
Identify stakeholders
“who else do you think I should talk to?”
Recognize multiple points of view
Work toward collaboration
The first questions
Who is behind the request for this work?
Who will use the solution?
What will be the economic benefit of a successful solution
Is there another source for the solution that you need?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 4
Eliciting Requirements
meetings are conducted and attended by both software engineers and
customers
rules for preparation and participation are established
an agenda is suggested
a "facilitator" (can be a customer, a developer, or an outsider) controls the
meeting
a "definition mechanism" (can be work sheets, flip charts, or wall stickers
or an electronic bulletin board, chat room or virtual forum) is used
the goal is
to identify the problem
propose elements of the solution
negotiate different approaches, and
specify a preliminary set of solution requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 5
Eliciting Requirements
Conduct FA ST
meetings
Make lists of
functions, classes
Make lists of
constraints, etc.
formal prioritization?
Elic it requirement s
yes no
draw use-case
write scenario
diagram
Create Use-cases
complete template
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 6
Quality Function Deployment
Function deployment determines the “value” (as
perceived by the customer) of each function required of
the system
Information deployment identifies data objects and
events
Task deployment examines the behavior of the system
Value analysis determines the relative priority of
requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 7
Quality Function Deployment
QFD : emphasizes an understanding of what is valuable
to customer & then deploys these values throughout
the engineering process.
3 types of requirements
Normal requirements
Expected requirements
Exciting requirements
8
QFD
QFD techniques applicable to requirements elicitation.
9
Elicitation Work Products
a statement of need and feasibility.
a bounded statement of scope for the system or product.
a list of customers, users, and other stakeholders who
participated in requirements elicitation
a description of the system’s technical environment.
a list of requirements (preferably organized by function)
and the domain constraints that apply to each.
a set of usage scenarios that provide insight into the use of
the system or product under different operating
conditions.
any prototypes developed to better define requirements.
requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 10
Use-Cases
A collection of user scenarios that describe the thread of usage of a system
Each scenario is described from the point-of-view of an “actor”—a person or
device that interacts with the software in some way
Each scenario answers the following questions:
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 11
Use-Case Diagram
Arms/ disarms
system
homeowner
Responds to
alarm event
Encounters an
error condition
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 16
Analysis Classes
External entities (e.g., other systems, devices, people) that produce or consume
information to be used by a computer-based system.
Things (e.g, reports, displays, letters, signals) that are part of the information domain for
the problem.
Roles (e.g., manager, engineer, salesperson) played by people who interact with the
system.
Organizational units (e.g., division, group, team) that are relevant to an application.
Places (e.g., manufacturing floor or loading dock) that establish the context of the
problem and the overall function of the system.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 17
Selecting Classes—Criteria
Retained information
Needed services
Multiple attributes
Common attributes
Common operations
Essential requirements
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 18
Class Diagram
Class name
System
systemID
verificationPhoneNumber
systemStatus attributes
delayTime
telephoneNumber
masterPassword
temporaryPassword
numberTries
program()
display()
reset()
query() operations
modify()
call()
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 19
Class Diagram
FloorPlan
type
name
outsideDimensions
determineType ( )
positionFloorplan
scale( )
change color( )
is placed within
is part of
Camera Wall
type type
ID wallDimensions
location
fieldV iew
panA ngle
ZoomSetting
determineType ( )
computeDimensions ( )
determineType ()
translateLocation ()
displayID()
displayV iew()
displayZoom()
is used to build is used to build
is used to build
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 21
CRC
Modeling
Class:
Class:
Description:
Class:
Description:
Class:FloorPlan
Description:
Responsibility:
Description: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
defines floor plan name/type
manages floor plan positioning
scales floor plan for display
scales floor plan for display
incorporates walls, doors and windows Wall
shows position of video cameras Camera
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 22
Class Types
Entity classes, also called model or business classes, are extracted
directly from the statement of the problem (e.g., FloorPlan and
Sensor).
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 23
Responsibilities
(Attributes and methods relevant to the class)
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 24
Collaborations
Classes fulfill their responsibilities in one of two ways:
A class can use its own operations to manipulate its own
attributes, thereby fulfilling a particular responsibility, or
a class can collaborate with other classes.
Collaborations identify relationships between classes
Collaborations are identified by determining whether a class
can fulfill each responsibility itself
Three different generic relationships between classes [WIR90]:
the is-part-of relationship
the has-knowledge-of relationship
the depends-upon relationship
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 25
Composite Aggregate Class
Player
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 26
Reviewing the CRC Model
All participants in the review (of the CRC model) are given a subset of the
CRC model index cards.
Cards that collaborate should be separated (i.e., no reviewer should have two
cards that collaborate).
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.
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 Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 27
Associations and Dependencies
Two analysis classes are often related to one another in
some fashion
In UML these relationships are called associations
Associations can be refined by indicating multiplicity (the term
cardinality is used in data modeling
In many instances, a client-server relationship exists
between two analysis classes.
In such cases, a client-class depends on the server-class in some
way and a dependency relationship is established
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 28
Multiplicity
Wall
1 1 1
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 29
Dependencies
DisplayWindow Camera
<<access>>
{password}
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 30
Analysis Packages
Various elements of the analysis model (e.g., use-cases,
analysis classes) are categorized in a manner that
packages them as a grouping
The plus sign preceding the analysis class name in each
package indicates that the classes have public visibility
and are therefore accessible from other packages.
Other symbols can precede an element within a package.
A minus sign indicates that an element is hidden from
all other packages and a # symbol indicates that an
element is accessible only to packages contained within a
given package.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 31
Analysis Packages
package name
Environment
+Tree
+Landscape
+Road
+Wall
+Bridge
+Building RulesOfTheGame
+VisualEffect
+Scene +RulesOfMovement
+ConstraintsOnAction
Characters
+Player
+Protagonist
+Antagonist
+SupportingRole
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 32
Behavioral Modeling
The behavioral model indicates how software will respond to
external events or stimuli. To create the model, the analyst
must perform the following steps:
Evaluate all use-cases to fully understand the sequence
consistency.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 33
State Representations
In the context of behavioral modeling, two different
characterizations of states must be considered:
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
The state of a class takes on both passive and active
characteristics [CHA93].
A passive state is simply the current status of all of an object’s
attributes.
The active state of an object indicates the current status of the
object as it undergoes a continuing transformation or processing.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 34
State Diagram for the ControlPanel Class
t imer < lockedTime
password = incorrect
& numberOfTries < maxTries
select ing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 35
The States of a System
state—a set of observables that
characterizes the behavior of a system at
a given time
state transition—the movement from one
state to another
event—an occurrence that causes the
system to exhibit some predictable form
of behavior
action—process that occurs as a
consequence of making a transition
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 36
Behavioral Modeling
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 37
Sequence Diagram
homeowner cont rol panel syst em sensors
sensors
syst em reading
A
ready
password ent ered
request lookup
comparing
result
password = correct
numberOfTries > maxTries request act ivat ion
locked
select ing
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 38
Writing the Software Specification
Everyone knew exactly
what had to be done
until someone wrote it
down!
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 39
Class Diagram
From the SafeHome system …
Sensor
name/id
type
location
area
characteristics
identify()
enable()
disable()
reconfigure()
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 40
State Diagram
Reading
Initialization
commands not jammed
start copies
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 42
Negotiating Requirements
Identify the key stakeholders
These are the people who will be involved in the negotiation
Determine each of the stakeholders “win conditions”
Win conditions are not always obvious
Negotiate
Work toward a set of requirements that lead to “win-win”
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 43
Validating Requirements-I
Is each requirement consistent with the overall objective for the
system/product?
Have all requirements been specified at the proper level of
abstraction? That is, do some requirements provide a level of
technical detail that is inappropriate at this stage?
Is the requirement really necessary or does it represent an add-on
feature that may not be essential to the objective of the system?
Is each requirement bounded and unambiguous?
Does each requirement have attribution? That is, is a source
(generally, a specific individual) noted for each requirement?
Do any requirements conflict with other requirements?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 44
Validating Requirements-II
Is each requirement achievable in the technical environment that will house
the system or product?
Is each requirement testable, once implemented?
Does the requirements model properly reflect the information, function and
behavior of the system to be built.
Has the requirements model been “partitioned” in a way that exposes
progressively more detailed information about the system.
Have requirements patterns been used to simplify the requirements model.
Have all patterns been properly validated? Are all patterns consistent with
customer requirements?
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and
are provided with permission by R.S. Pressman & Associates, Inc., copyright © 1996, 2001, 2005 45