chapter 7 requirements engineering - usu opencourseware

24
Software Engineering: A Practitioner’s Approach, 6/e Software Engineering: A Practitioner’s Approach, 6/e Chapter 7 Chapter 7 Requirements Engineering Requirements Engineering 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 copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc. For University Use Only May be reproduced ONLY for student use at the university level when used in conjunction with Software Engineering: A Practitioner's Approach. Any other reproduction or use is expressly prohibited.

Upload: others

Post on 05-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Software Engineering: A Practitioner’s Approach, 6/eSoftware Engineering: A Practitioner’s Approach, 6/e

Chapter 7Chapter 7Requirements EngineeringRequirements Engineering

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

copyright © 1996, 2001, 2005

R.S. Pressman & Associates, Inc.

For University Use OnlyMay be reproduced ONLY for student use at the university level

when used in conjunction with Software Engineering: A Practitioner's Approach.Any other reproduction or use is expressly prohibited.

Requirements EngineeringRequirements Engineering

�� Stages:Stages:

�� InceptionInception

�� ElicitationElicitation

�� ElaborationElaboration

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

�� ElaborationElaboration

�� NegotiationNegotiation

�� SpecificationSpecification

�� ValidationValidation

�� ManagementManagement

Requirements EngineeringRequirements Engineering

�� InceptionInception——ask a set of questions that establish …ask a set of questions that establish …

�� basic understanding of the problembasic understanding of the problem

�� the people who want a solutionthe people who want a solution

�� the nature of the solution that is desired, and the nature of the solution that is desired, and

�� the effectiveness of preliminary communication and collaboration between the effectiveness of preliminary communication and collaboration between

the customer and the developerthe customer and the developer

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

the customer and the developerthe customer and the developer

�� ElicitationElicitation——elicit requirements from all stakeholderselicit requirements from all stakeholders

�� address problems of scopeaddress problems of scope

�� address problems of understandingaddress problems of understanding

�� customers not sure about what is needed, skip “obvious” issues, have difficulty customers not sure about what is needed, skip “obvious” issues, have difficulty communicating with the software engineer, have poor grasp of problem domaincommunicating with the software engineer, have poor grasp of problem domain

�� address problems of volatilityaddress problems of volatility

Requirements EngineeringRequirements Engineering

�� ElaborationElaboration——create an analysis model that identifies data, create an analysis model that identifies data,

function, features, constraints and behavioral requirementsfunction, features, constraints and behavioral requirements

�� NegotiationNegotiation——agree on a deliverable system that is realistic for agree on a deliverable system that is realistic for

developers and customersdevelopers 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 4

developers and customersdevelopers and customers

�� rank requirements by priority (conflicts arise here …)rank requirements by priority (conflicts arise here …)

�� identify and analyze risks assoc. with each requirementidentify and analyze risks assoc. with each requirement

�� “guestimate” efforts needed to implement each requirement“guestimate” efforts needed to implement each requirement

�� eliminate, combine and / or modify requirements to make project eliminate, combine and / or modify requirements to make project

realisticrealistic

Requirements EngineeringRequirements Engineering

�� SpecificationSpecification——can be any one (or more) of the following:can be any one (or more) of the following:�� A written documentA written document

�� A set of modelsA set of models

�� A formal mathematical modelA formal mathematical model

�� A collection of user scenarios (useA collection of user scenarios (use--cases)cases)

�� A prototypeA prototype

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

�� ValidationValidation——a review mechanism that looks for:a review mechanism that looks for:�� errors in content or interpretationerrors in content or interpretation

�� areas where clarification may be requiredareas where clarification may be required

�� missing informationmissing information

�� inconsistencies (a major problem when large products or systems inconsistencies (a major problem when large products or systems are engineered)are engineered)

�� conflicting or unrealistic (unachievable) requirementsconflicting or unrealistic (unachievable) requirements

Requirements EngineeringRequirements Engineering

�� Requirements management involves managing change:Requirements management involves managing change:

�� Feature traceability:Feature traceability: how requirements relate to observable how requirements relate to observable system/product featuressystem/product features

�� Source traceability:Source traceability: identifies source of each requirementidentifies source of each requirement

Dependency traceability:Dependency traceability: how requirements are related to how requirements are related to

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

�� Dependency traceability:Dependency traceability: how requirements are related to how requirements are related to each othereach other

�� Subsystem traceability:Subsystem traceability: categorizes requirements by the categorizes requirements by the subsystem(s) they governsubsystem(s) they govern

�� Interface traceability:Interface traceability: how requirements relate to both how requirements relate to both external and internal system interfacesexternal and internal system interfaces

InceptionInception

�� Identify stakeholdersIdentify stakeholders

�� “whom else do you think I should talk to?”“whom else do you think I should talk to?”

�� Recognize multiple points of viewRecognize multiple points of view

�� Work toward collaborationWork toward collaboration

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

�� The first questions:The first questions:

�� Who is behind the request for this work?Who is behind the request for this work?

�� Who will use the solution?Who will use the solution?

�� What will be the economic benefit of a successful solution?What will be the economic benefit of a successful solution?

�� Is there another source for the solution that you need?Is there another source for the solution that you need?

InceptionInception

�� The subsequent questions:The subsequent questions:

�� What constitutes a “good” output from the system?What constitutes a “good” output from the system?

�� What problem(s) does this solution address?What problem(s) does this solution address?

�� What is the intended business environment for this What is the intended business environment for this

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 8

What is the intended business environment for this What is the intended business environment for this solution?solution?

�� What performance issues or constraints should What performance issues or constraints should affecting my approach to the solutionaffecting my approach to the solution

InceptionInception

�� The final questions:The final questions:

�� Are your answers official?Are your answers official?

�� Are my questions relevant?Are my questions relevant?

Am I asking too many questions?Am I asking too many 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 9

�� Am I asking too many questions?Am I asking too many questions?

�� Can anyone else provide additional info?Can anyone else provide additional info?

�� Should I be asking anything else?Should I be asking anything else?

Eliciting RequirementsEliciting Requirements�� Meetings are conducted and attended by both software Meetings are conducted and attended by both software

engineers and customersengineers and customers

�� Rules for preparation and participation are establishedRules for preparation and participation are established

�� An agenda is suggested An agenda is suggested

�� A "facilitator" (can be a customer, a developer, or an outsider) A "facilitator" (can be a customer, a developer, or an outsider) controls the meetingcontrols the meeting

�� A "definition mechanism" (can be work sheets, flip charts, or wall A "definition mechanism" (can be work sheets, flip charts, or wall

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

�� A "definition mechanism" (can be work sheets, flip charts, or wall A "definition mechanism" (can be work sheets, flip charts, or wall stickers or an electronic bulletin board, chat room or virtual stickers or an electronic bulletin board, chat room or virtual forum) is usedforum) is used

�� The goal is The goal is

�� to identify the problemto identify the problem

�� propose elements of the solutionpropose elements of the solution

�� negotiate different approaches, andnegotiate different approaches, and

�� specify a preliminary set of solution requirementsspecify a preliminary set of solution requirements

Use QFD to inform ally

form al priorit izat ion?

yes no

El ic i t requi rem ent s

def ine actors

Conduct FAST

m eet ings

Make lis ts of

funct ions, c lasses

Make lists of

const raints, etc.

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 QFD to

priorit ize

requirem ents

inform ally

priorit ize

requirem ents

Create Use-cases

write scenario

def ine actors

com plete tem plate

draw use-case

diagram

Quality Function DeploymentQuality Function Deployment

�� A technique of translating customer needs into technical A technique of translating customer needs into technical

system requirements:system requirements:

�� Normal requirements:Normal requirements: reflect stated customer goals reflect stated customer goals and objectivesand objectives

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 12

�� Expected requirements:Expected requirements: implicit to the product or implicit to the product or system; their absence will cause significant customer system; their absence will cause significant customer dissatisfactiondissatisfaction

�� Exciting requirements:Exciting requirements: featured going beyond featured going beyond customer expectations, causing customer euphoria (;customer expectations, causing customer euphoria (;--))

Quality Function DeploymentQuality Function Deployment

�� Function deploymentFunction deployment determines the “value” (as determines the “value” (as perceived by the customer) of each function required of perceived by the customer) of each function required of the systemthe system

�� Information deploymentInformation deployment identifies data objects and identifies data objects and

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 13

Information deploymentInformation deployment identifies data objects and identifies data objects and eventsevents

�� Task deploymentTask deployment examines the behavior of the systemexamines the behavior of the system

�� Value analysisValue analysis determines the relative priority of determines the relative priority of requirementsrequirements

Elicitation Work ProductsElicitation Work Products

�� A statement of need and feasibility.A statement of need and feasibility.

�� A bounded statement of scope for the system or product.A bounded statement of scope for the system or product.

�� A list of customers, users, and other stakeholders who A list of customers, users, and other stakeholders who participated in requirements elicitation participated in requirements elicitation

�� A description of the system’s technical environment.A description of the system’s technical environment.

A list of requirements (preferably organized by function) A list of requirements (preferably organized by function)

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 14

�� A list of requirements (preferably organized by function) A list of requirements (preferably organized by function) and the domain constraints that apply to each.and the domain constraints that apply to each.

�� A set of usage scenarios that provide insight into the use A set of usage scenarios that provide insight into the use of the system or product under different operating of the system or product under different operating conditions.conditions.

�� Any prototypesAny prototypes developed to better define requirementsdeveloped to better define requirements.

UseUse--CasesCases�� A collection of user scenarios that describe the thread of usage of a systemA collection of user scenarios that describe the thread of usage of a system

�� Each scenario is described from the pointEach scenario is described from the point--ofof--view of an “actor”view of an “actor”——a person or a person or device that interacts with the software in some waydevice that interacts with the software in some way

�� Each scenario answers the following questions:Each scenario answers the following questions:�� Who is the primary actor, the secondary actor (s)?Who is the primary actor, the secondary actor (s)?

�� What are the actor’s goals?What are the actor’s goals?

�� What preconditions should exist before the story begins?What preconditions should exist before the story begins?

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 15

�� What preconditions should exist before the story begins?What preconditions should exist before the story begins?

�� What main tasks or functions are performed by the actor?What main tasks or functions are performed by the actor?

�� What extensions might be considered as the story is described?What extensions might be considered as the story is described?

�� What variations in the actor’s interaction are possible?What variations in the actor’s interaction are possible?

�� What system information will the actor acquire, produce, or change?What system information will the actor acquire, produce, or change?

�� Will the actor have to inform the system about changes in the external environment?Will the actor have to inform the system about changes in the external environment?

�� What information does the actor desire from the system?What information does the actor desire from the system?

�� Does the actor wish to be informed about unexpected changes?Does the actor wish to be informed about unexpected changes?

UseUse--Case DiagramCase Diagram

homeowner

Arms/ disarms

syst em

Accesses syst em

via Int ernet

Responds t o

sensors

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

Reconf igures sensors

and relat ed

syst em f eat ures

Responds t o

alarm event

Encount ers an

error condit ion

syst em

administ rat or

Building the Analysis ModelBuilding the Analysis Model

�� Intent: to provide a description of the required Intent: to provide a description of the required informational, functional and behavioral domains informational, functional and behavioral domains of the computerof the computer--based systembased system

�� The model changes dynamically as the system The model changes dynamically as 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

�� The model changes dynamically as the system The model changes dynamically as the system engineers learn more about the systemengineers learn more about the system

�� Is a series of timeIs a series of time--ordered snapshots of ordered snapshots of requirementsrequirements

Building the Analysis ModelBuilding the Analysis Model

�� Elements of the analysis modelElements of the analysis model

�� ScenarioScenario--based elementsbased elements

�� FunctionalFunctional——processing narratives for software functionsprocessing narratives for software functions

�� UseUse--casecase——descriptions of the interaction between an descriptions of the interaction between an

“actor” and the system“actor” and 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 18

�� ClassClass--based elementsbased elements

�� Implied by scenariosImplied by scenarios

�� Behavioral elementsBehavioral elements

�� State diagramState diagram

�� FlowFlow--oriented elementsoriented elements

�� Data flow diagramData flow diagram

Class DiagramClass Diagram

Sensor

name/id

type

From the From the SafeHomeSafeHome system …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 19

type

location

area

characteristics

identify()

enable()

disable()

reconfigure()

State DiagramState DiagramInit ializat ion

syst em st at us=“not ready”

display msg = “please wait ”

display st at us = blinking

ent ry/ swit ch machine on

do: run diagnost ics

do: init iat e all subsyst ems

t urn copier “on“

subsyst ems

readysyst em st at us=“Ready”

display msg = “ent er cmd” display st at us = st eady

ent ry/ subsyst ems ready

do: poll user input panel do: read user input

do: int erpret user input

Reading

commands

Making copies

st art copies

load paper

paper f ull

t urn copier “of f ”

not jammed

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 20

Figure 7.6 Preliminary UML st at e diagram for a phot ocopier

syst em st at us=“Copying”

display msg= “copy count =” display message=#copies

display st at us= st eady

ent ry/ st art copies

do: manage copying

do: monit or paper t ray

do: monit or paper f low

Making copies

syst em st at us=“Jammed”

display msg = “paper jam”

display message=locat ion

display st at us= blinking

ent ry/ paper jammed

do: det ermine locat ion do: provide correct ive msg.

do: int errupt making copies

problem diagnosis

paper jammed

syst em st at us=“load paper”

display msg= “ load paper”

display st at us= blinking

ent ry/ paper empt y

do: lower paper t ray do: monit or f ill swit ch

do: raise paper t ray

load paper

paper t ray empt y

not jammed

copies complet e

Analysis PatternsAnalysis Patterns

Pattern name:Pattern name: A descriptor that captures the essence of the pattern. A descriptor that captures the essence of the pattern.

Intent:Intent: Describes what the pattern accomplishes or represents Describes what the pattern accomplishes or represents

Motivation:Motivation: A scenario that illustrates how the pattern can be used to address the A scenario that illustrates how the pattern can be used to address the problem.problem.

Forces and context:Forces and context: A description of external issues (forces) that can affect how the A description of external issues (forces) that can affect how the pattern is used and also the external issues that will be resolved when the pattern is pattern is used and also the external issues that will be resolved when the pattern is applied. applied.

Solution:Solution: A description of how the pattern is applied to solve the problem with an A description of how the pattern is applied to solve the problem with an emphasis on structural and behavioral issues.emphasis on structural and behavioral issues.

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

emphasis on structural and behavioral issues.emphasis on structural and behavioral issues.

ConsequencesConsequences: Addresses what happens when the pattern is applied and what trade: Addresses what happens when the pattern is applied and what trade--offs exist during its application.offs exist during its application.

DesignDesign: Discusses how the analysis pattern can be achieved through the use of : Discusses how the analysis pattern can be achieved through the use of known design patterns.known design patterns.

Known usesKnown uses: Examples of uses within actual systems.: Examples of uses within actual systems.

Related patternsRelated patterns: On e or more analysis patterns that are related to the named pattern : On e or more analysis patterns that are related to the named pattern because (1) it is commonly used with the named pattern; (2) it is structurally similar to because (1) it is commonly used with the named pattern; (2) it is structurally similar to the named pattern; (3) it is a variation of the named pattern.the named pattern; (3) it is a variation of the named pattern.

Negotiating RequirementsNegotiating Requirements

�� Identify the key stakeholdersIdentify the key stakeholders

�� These are the people who will be involved in the negotiationThese are the people who will be involved in the negotiation

�� Determine each of the stakeholders “win conditions”Determine each of the stakeholders “win conditions”

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

Determine each of the stakeholders “win conditions”Determine each of the stakeholders “win conditions”

�� Win conditions are not always obviousWin conditions are not always obvious

�� NegotiateNegotiate

�� Work toward a set of requirements that lead to “winWork toward a set of requirements that lead to “win--win”win”

Validating RequirementsValidating RequirementsChecking Checking for Consistency, Omissions, Ambiguityfor Consistency, Omissions, Ambiguity

�� Is each requirement consistent with the overall objective for the Is each requirement consistent with the overall objective for the system/product?system/product?

�� Have all requirements been specified at the proper level of Have all requirements been specified at the proper level of abstraction? That is, do some requirements provide a level of abstraction? That is, do some requirements provide a level of technical detail that is inappropriate at this stage?technical detail that is inappropriate at this stage?

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

technical detail that is inappropriate at this stage?technical detail that is inappropriate at this stage?

�� Is the requirement really necessary or does it represent an addIs the requirement really necessary or does it represent an add--on on feature that may not be essential to the objective of the system?feature that may not be essential to the objective of the system?

�� Is each requirement bounded and unambiguous?Is each requirement bounded and unambiguous?

�� Does each requirement have attribution? That is, is a source Does each requirement have attribution? That is, is a source (generally, a specific individual) noted for each requirement? (generally, a specific individual) noted for each requirement?

�� Do any requirements conflict with other requirements?Do any requirements conflict with other requirements?

Validating RequirementsValidating Requirements

�� Is each requirement achievable in the technical environment that will house Is each requirement achievable in the technical environment that will house

the system or product?the system or product?

�� Is each requirement testable, once implemented?Is each requirement testable, once implemented?

�� Does the requirements model properly reflect the information, function and Does the requirements model properly reflect the information, function and

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

�� Does the requirements model properly reflect the information, function and Does the requirements model properly reflect the information, function and

behavior of the system to be built.behavior of the system to be built.

�� Has the requirements model been “partitioned” in a way that exposes Has the requirements model been “partitioned” in a way that exposes

progressively more detailed information about the system.progressively more detailed information about the system.

�� Have requirements patterns been used to simplify the requirements model. Have requirements patterns been used to simplify the requirements model.

Have all patterns been properly validated? Are all patterns consistent with Have all patterns been properly validated? Are all patterns consistent with customer requirements?customer requirements?