1 software engineering: a practitioner’s approach, 6/e chapter 7: 7.5-7.9 requirements engineering...

10
1 Software Engineering: A Practitioner’s Approach, 6/e Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Chapter 7: 7.5-7.9 Requirements Engineering Requirements Engineering 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: julius-adams

Post on 04-Jan-2016

245 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

1

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

Chapter 7: 7.5-7.9Chapter 7: 7.5-7.9Requirements EngineeringRequirements Engineering

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.

Page 2: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

2

Use-CasesUse-Cases A collection of user scenarios that describe the thread of usage of a A collection of user scenarios that describe the thread of usage of a

systemsystem Each scenario is described from the point-of-view of an “actor”—a Each scenario is described from the point-of-view of an “actor”—a

person or device that interacts with the software in some wayperson or device 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? 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 Will the actor have to inform the system about changes in the external

environment?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?

Page 3: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

3

Use-Case DiagramUse-Case Diagram

homeowner

Arms/ disarms system

Accesses system via Internet

Reconfigures sensors and related

system features

Responds toalarm event

Encounters anerror condition

system administrator

sensors

Page 4: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

4

Building the Analysis ModelBuilding the Analysis Model

Elements of the analysis modelElements of the analysis model Scenario-based elementsScenario-based elements

Functional—processing narratives for software Functional—processing narratives for software functionsfunctions

Use-case—descriptions of the interaction between Use-case—descriptions of the interaction between an “actor” and the systeman “actor” and the system

Class-based elementsClass-based elements Implied by scenariosImplied by scenarios

Behavioral elementsBehavioral elements State diagramState diagram

Flow-oriented elementsFlow-oriented elements Data flow diagramData flow diagram

Page 5: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

5

Class DiagramClass Diagram

Sensor

name/id type location area characteristics

identify() enable() disable() reconfigure()

From the From the SafeHomeSafeHome system … system …

Page 6: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

6

State DiagramState Diagram

Figure 7.6 Preliminary UML state diagram for a photocopier

Initialization

system status=“not ready” display msg = “please wait” display status = blinking

entry/ switch machine on do: run diagnostics do: initiate all subsystems

turn copier “on“

subsystems ready system status=“Ready”

display msg = “enter cmd” display status = steady

entry/ subsystems ready do: poll user input panel do: read user input do: interpret user input

Readingcommands

system status=“Copying” display msg= “copy count =” display message=#copies display status= steady

entry/ start copies do: manage copying do: monitor paper tray do: monitor paper flow

Making copies

start copies

system status=“Jammed” display msg= “paper jam” display message=location display status= blinking

entry/ paper jammed do: determine location do: provide corrective msg. do: interrupt making copies

problem diagnosis

paper jammed

system status=“load paper” display msg= “load paper” display status= blinking

entry/ paper empty do: lower paper tray do: monitor fill switch do: raise paper tray

load paper

paper tray empty

not jammed

paper full

turn copier “off”

not jammed

copies complete

Page 7: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

7

Analysis PatternsAnalysis PatternsPattern 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 A scenario that illustrates how the pattern can be used to address the problem.address the problem.

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

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

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

DesignDesign: Discusses how the analysis pattern can be achieved through : Discusses how the analysis pattern can be achieved through the use of known design patterns.the use of 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 : On e or more analysis patterns that are related to the named pattern because (1) it is commonly used with the named the named pattern because (1) it is commonly used with the named pattern; (2) it is structurally similar to the named pattern; (3) it is a pattern; (2) it is structurally similar to the named pattern; (3) it is a variation of the named pattern.variation of the named pattern.

Page 8: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

8

Negotiating RequirementsNegotiating Requirements

Identify the key stakeholdersIdentify the key stakeholders These are the people who will be involved in the These are the people who will be involved in the

negotiationnegotiation Determine each of the stakeholders “win Determine each of the stakeholders “win

conditions”conditions” Win conditions are not always obviousWin conditions are not always obvious

NegotiateNegotiate Work toward a set of requirements that lead to “win-Work toward a set of requirements that lead to “win-

win”win”

Page 9: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

9

Validating Requirements-IValidating Requirements-I Is each requirement consistent with the overall objective Is each requirement consistent with the overall objective

for the system/product?for the 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 abstraction? That is, do some requirements provide a level of technical detail that is inappropriate at this stage?of technical detail that is inappropriate at this stage?

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

Is each requirement bounded and unambiguous?Is each requirement bounded and unambiguous? Does each requirement have attribution? That is, is a Does each requirement have attribution? That is, is a

source (generally, a specific individual) noted for each source (generally, a specific individual) noted for each requirement? requirement?

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

Page 10: 1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7: 7.5-7.9 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e

10

Validating Requirements-IIValidating Requirements-II

Is each requirement achievable in the technical environment that Is each requirement achievable in the technical environment that will house the system or product?will house the system or product?

Is each requirement testable, once implemented?Is each requirement testable, once implemented? Does the requirements model properly reflect the information, Does the requirements model properly reflect the information,

function and behavior of the system to be built.function and behavior of the system to be built. Has the requirements model been “partitioned” in a way that Has the requirements model been “partitioned” in a way that

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

Have requirements patterns been used to simplify the Have requirements patterns been used to simplify the requirements model. Have all patterns been properly validated? requirements model. Have all patterns been properly validated? Are all patterns consistent with customer requirements?Are all patterns consistent with customer requirements?