Unit-II ch-2 Requirements Engineering

Download as pdf or txt
Download as pdf or txt
You are on page 1of 57

Unit-II ch-2

Requirements Engineering
•Introduction
•Establishing the ground work
•Eliciting requirements
•Developing Use Cases
•Building the Analysis model
•Negotiating Requirements
•Requirement Monitoring
•Validating Requirements
Introduction
⚫ The broad spectrum of tasks and techniques that lead to an
understanding of re-quirements is called requirements
engineering.
⚫ From a software process perspective, requirements
engineering is a major software engineering action that
begins during the communication activity and continues into
the modeling activity.
⚫ Requirements engineering builds a bridge to design and
construction.
⚫ Requirements engineering provides the appropriate
mechanism for understand- ing what the customer wants,
analyzing need, assessing feasibility, negotiating a rea-
sonable solution, specifying the solution unambiguously,
validating the specification, and managing the requirements
as they are transformed into an operational system
⚫Collecting needs from the customer. Managing the
Process.
Tasks involved:
⚫ Inception
⚫ Elicitation
⚫ Elaboration
⚫ Negotiation
⚫ Specification
⚫ Validation
⚫ Requirements Management
Inception (Beginning)
Duringinception, the
requirements asks a set of
questions to establish:
•Basic understanding of the
problem.
•Nature of the solution that
is desired.
Requirements Engineers
needs to Identify the
stakeholders,recognize
multiple viewpoints, work
toward collaboration
initiate the and communication
Elicitation: (Extraction)

Eliciting requirements is difficult because of


Problems of scope
Identify the boundaries of the system.
Problems of understanding Domain , computing
environment.
Problems of Volatility
Requirements may change over time.
Elicitation may be accomplished through two activities:
Collaborative Requirements Gathering
Quality Function Deployment.
Elaboration (explanation)
Takes the information obtained
during inception and elicitation.
Focuses on developing a refined
model of software functions,
features & Constraints.
This is an analyzing phase.
It defines the
informationalfunctional, and
constraints behavioral of
domain. the problem
Negotiation (Cooperation)
Software engineer
reconciles the conflicts
between what the
customer wants and
what can be achieved.
Requirements are ranked
by the customer, users
and other stakeholders.
Risks associated with
each requirement
are identified.
Specifications
Final work product produced
by the requirements engineer.
Form of SRS.
Serves as a foundation.
It formalizes the functional and
behavioral requirements of the
proposed software in both the
graphical and textual format.
Validation
⚫ Specification is examined to ensure that all the
s/w requirements have been stated
unambiguously.
Errors have been detected and corrected.
Members involved:
Software Engineers
Customers
Users
Other stakeholders.
Requirements Management
Project team performs a set of activities to identify,
control and track requirements and changes to
the requirements at any times as the project proceeds.
Each requirement is assigned a unique identifier.
Place therequirements into one or traceability
tables.
Tables may be stored in a database that relate
features, sources, dependencies subsystems and
interfaces to the requirements.
Ground Work Establishment
Ground Work for Requirement Analysis consist
of
Identifying stakeholders,
Recognizing viewpoints,
Establishing collaboration among the stakeholders
and through conducting Questionaire conversions among
the stakeholders.
Stakeholders
Identification
Stakeholder may be a project team member, employee of
the user organization or a Senior Manager.
Stakeholder analysis is a technique to identify and analysis
the stakeholders project.
Provides information on stakeholders and their
relationships, interests and their expectations.
Stakeholder expectations and Interests:
“Guess Work”
Approaches:
Using checklist
Plotting people in small models.
Stakeholder influence and Role in the
project
Be active
Involvement
Vested interest.
Stakeholder Categories:
Project Manager
Team Members
Team Leads
Project Resource Manager
Senior Managers, Executives or Sponsors
Multiple Viewpoint
Recognition

Marketing Group is interested in functions and features


(easy to sell)
Support engineers may focus on maintainability of the
software.
Business managers are interested in a feature that will be
ready to meet defined market windows.
Collaboration

Each stakeholders has


different opinion about
the set of requirements.
Requirement engineer
must identify areas of
commonality.
Identify the area of
inconsistency.
Reduce dependencies
among engineers.
Requirement Elicitation
Discovering the requirement for the system.
Identify the requirements by communicating with the customers, system users
and other.
Requirements sources:
Domain Knowledge
Stakeholders Operational
Environment
Organizational Environment.
Elicitation Techniques:
Interviews Scenarios
Facilitated Meeting
Prototypes
Observation
Building Use Cases
Use cases describe the interactions between a
user and a system.
Focusing on What the system DOES for the user.
Describe the totalityof the system and
behavior of the system.
Includes:
Actors List
Use case packages
Use case diagrams
Use case text
Use case views.
Activities involved in use cases
Find actors
Project Manager
Architect
End-users
Customers
Development Team
Find use cases
Describe the use case.
Steps for developing
use case diagram
1. Use abstract idea
2. Define use case actors
3. Define use case actor goals
4. Identify reuse opportunity for use case
5. Create use case index
6. Identify the key components
7. Name and briefly describe the use case.
8. Create use case basic view
9. Create use case alternate flows
10. Produce the use case document
11. Generate a use case model diagram.
Sample Use case Diagram
Negotiating Requirements
Effective practices:
Get the right stakeholder Establish team work
mentality
Plan team iteration
Use Group Support System(GSS)
Establish shared vocabulary
Maintain list of requirements
Record requirement attributes
Manage by probabilities
Select base decisions
Select operational approach
Plan more
Re-plan before every release
Find workable solution
Provide training in the negotiation process
Use trained facilitator
Consider requirement, architecture and market place.
Leverage the triple constraint (Cost Vs Time Vs Scope)
Validating Requirements
● 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??
Continued…
■ 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?
Chapter-3
DESIGN CONCEPTS
•The design process
•Design Concepts
•The design model
Introduction
■ Mitch Kapor, the creator of Lotus 1-2-3, presented a
“software design manifesto” in Dr. Dobbs Journal. He
said:
■ Good software design should exhibit:
■ Firmness: A program should not have any bugs that
inhibit its function.

■ Commodity: A program should be suitable for the


purposes for which it was intended.

■ Delight:The experience of using the program should be


pleasurable one
DESIGN WITH THE CONTEXT OF
SE
⚫ “The most common miracle of software engineering is
the transition from analysis to design and design to
code.”
⚫ Software design sits at the technical kernel of software
engineering and is applied regardless of the software
process model that is used.
⚫ Beginning once software requirements have been
analyzed and modeled, software design is the last
software engineering action within the modeling activity
and sets the stage for construction (code generation and
testing).
Translating the requirements model into
the design model

Flow-oriente
Scenerio-bas d elements Component-
Level Design
ed elements
Use cases – text Data flow
diagrams
Use-case diagrams Control-flow
Activity diagrams
Swimlane diagrams diagrams
Processing
narratives Interface Design
Analysis Model

Class-based elements Behavioral


elements Architectural Design

Class diagrams State diagrams


Analysis packages Sequence
CRC models diagrams
Collaboration Data/Class Design
diagrams

Design Model
Contd…
⚫ The data/class design transforms class models into
design class realizations and the requisite data structures
required to implement the software.
⚫ The architectural design defines the relationship
between major structural elements of the software, the
architectural styles and design patterns that can be used
to achieve the requirements defined for the system, and
the constraints that affect the way in which architecture
can be implemented.
Contd….
⚫ The interface design describes how the software
communicates with systems that interoperate with it,
and with humans who use it. An interface implies a flow
of information (e.g., data and/or control) and a specific
type of behavior.
⚫ The component-level design transforms structural
elements of the software ar-chitecture into a
procedural description of software components.
DESIGN PROCESS

•Software design is an iterative process through which


requirements are translated into a “blueprint” for
constructing the software.
•The blueprint depicts a holistic view of software.
Software Quality Guidelines and
Attributes
●The design must implement all of the explicit
requirements contained in the requirements
model, and it must accommodate all of the
implicit require- ments desired by stakeholders.
●The design must be a readable, understandable
guide for those who generate code and for those
who test and subsequently support the software.
●The design should provide a complete picture of
the software, addressing the data, functional, and
behavioral domains from an implementation
perspective.
Software Quality Guidelines
■ A design should exhibit an architecture that (1) has been created using recognizable
architectural styles or patterns, (2) is composed of components that exhibit good design
characteristics and (3) can be implemented in an evolutionary fashion
■ For smaller systems, design can sometimes be developed linearly.
■ A design should be modular; that is, the software should be logically partitioned into
elements or subsystems
■ A design should contain distinct representations of data, architecture, interfaces,
and components.
■ A design should lead to data structures that are appropriate for the classes to
be implemented and are drawn from recognizable data patterns.
■ A design should lead to components that exhibit independent functional
characteristics.
■ A design should lead to interfaces that reduce the complexity of connections between
components and with the external environment.
■ A design should be derived using a repeatable method that is driven by
information obtained during software requirements analysis.
■ A design should be represented using a notation that effectively communicates its
meaning.

These slides are designed to accompany Software Engineering: A Practitioner’s


Approach, 7/e
(McGraw-Hill, 2009) Slides copyright 2009 by Roger Pressman.
5
Software Quality Guidelines
⚫ Functionality
⚫ Usability
⚫ Reliability
⚫ Performance
⚫ Supportablity
Design Concepts
⚫ A set of fundamental software design concepts has
evolved over the history of soft- ware engineering.
⚫ Each provides the software designer with a foundation
from which more sophisticated design methods can be
applied. Each helps you answer the following questions:
◦ What criteria can be used to partition software into
individual components?
◦ How is function or data structure detail separated from
a conceptual repre- sentation of the software?
◦ What uniform criteria define the technical quality of a
software design?
⚫ M. A. Jackson [Jac75] once said: “The
beginning of wisdom for a [software
engi- neer] is to recognize the
difference between getting a
program to work, and getting it
right.” Fundamental software design
concepts provide the necessary
framework for “getting it right.”
Fundamental Concepts
■ Abstraction—data, procedure, control
■ Architecture—the overall structure of the software
■ Patterns—”conveys the essence” of a proven design solution
■ Separation of concerns—any complex problem can be more easily handled if it is
subdivided into pieces
■ Modularity—compartmentalization of data and function
■ Hiding—controlled interfaces
■ Functional independence—single-minded function and low coupling
■ Refinement—elaboration of detail for all abstractions
■ Aspects—a mechanism for understanding how global requirements
affect design
■ Refactoring—a reorganization technique that simplifies the design
■ OO design concepts—OO design concepts such as classes and objects, inheritance,
messages, and polymor- phism, among others.
■ Design Classes—provide design detail that will enable analysis
classes to be implemented

7
Data Abstraction

8
Procedural Abstraction

details of
enter
algorithm

implemented with a "knowledge"


of the object that is associated
with enter

9
Architecture
“The overall structure of the software and the ways in which that
structure provides conceptual integrity for a system.” [SHA95a]
Structural properties. This aspect of the architectural design
representation defines the components of a system (e.g., modules, objects,
filters) and the manner in which those components are packaged and
interact with one another. For example, objects are packaged to encapsulate
both data and the processing that manipulates the data and interact via the
invocation of methods
Extra-functional properties. The architectural design description should
address how the design architecture achieves requirements for performance,
capacity, reliability, security, adaptability, and other system characteristics.
Families of related systems. The architectural design should draw upon
repeatable patterns that are commonly encountered in the design of
families of similar systems. In essence, the design should have the
ability to reuse architectural building blocks.

10
Patterns
⚫ Design Pattern Template
⚫ Pattern name—describes the essence of the pattern in a short but
expressive name
⚫ Intent—describes the pattern and what it does
⚫ Also-known-as—lists any synonyms for the pattern
⚫ Motivation—provides an example of the problem
⚫ Applicability—notes specific design situations in which the pattern is
applicable
⚫ Structure—describes the classes that are required to implement the pattern
⚫ Participants—describes the responsibilities of the classes that are
⚫ required to implement the pattern
⚫ Collaborations—describes how the participants collaborate to carry out their
responsibilities
⚫ Consequences—describes the “design forces” that affect the pattern and the
potential trade-offs that must be considered when the pattern is implemented
⚫ Related patterns—cross-references related design patterns

11
Separation of Concerns
■ Any complex problem can be more easily handled
if it is subdivided into pieces that can each be
solved and/or optimized independently
■ A concern is a feature or behavior that is specified
as part of the requirements model for the software
■ By separating concerns into smaller, and therefore
more manageable pieces, a problem takes less
effort and time to solve.

These slides are designed to accompany Software Engineering: A Practitioner’s


Approach, 7/e
(McGraw-Hill, 2009) Slides copyright 2009 by Roger Pressman.
Modularity
■ "modularity is the single attribute of software that allows a
program to be intellectually manageable" [Mye78].
■ Monolithic software (i.e., a large program composed of a
single module) cannot be easily grasped by a software
engineer.
■ The number of control paths, span of reference, number
of variables, and overall complexity would make
understanding close to impossible.
■ In almost all instances, you should break the design into
many modules, hoping to make understanding easier and as
a consequence, reduce the cost required to build the
software.
Cost
Total software cost
of
effort Cost to integrate

Region of minimum cost


M

Number of modules
Information Hiding

modul
econtrolle
d
interface

client
"secret
s "

a specific design
decision
Stepwise Refinement
open

walk to door;
reach for
knob;
open repeat until door
door; opens
walk if knob doesn't turn,
through; then
find correct
key; insert in
lock;
endif
pull/push door
move out of
way; end
repeat
Functional Independence
■ Functional independence is achieved by developing modules with
"single-minded" function and an "aversion" to excessive interaction with
other modules.
■ Cohesion is an indication of the relative functional strength of a
module.
■ A cohesive module performs a single task, requiring little interaction with other
components in other parts of a program. Stated simply, a cohesive module
should (ideally) do just one thing.
■ Coupling is an indication of the relative interdependence among modules.
■ Coupling depends on the interface complexity between modules, the point at
which entry or reference is made to a module, and what data pass across the
interface.
Aspects
■ Consider two requirements, A and B.
Requirement A crosscuts requirement B
“if a software decomposition
[refinement] has been chosen in which
B cannot be satisfied without taking A
into account. [Ros04]
■ An aspect is a representation of a
cross-cutting concern.
Refactoring
■ Fowler [FOW99] defines refactoring in the following manner:

■ "Refactoring is the process of changing a software system in


such
a way that it does not alter the external behavior of the code
[design] yet improves its internal structure.”
■ When software is refactored, the existing design is examined for
■ Redundancy
■ unused design elements
■ inefficient or unnecessary algorithms
■ poorly constructed or inappropriate data structures
■ or any other design failure that can be corrected to yield a better
design.
OO Design Concepts
Design classes
Entity classes
Boundary classes
Controller classes
■ Inheritance—all responsibilities of a superclass is
immediately inherited by all subclasses
■ Messages—stimulate some behavior to occur in the
receiving object
■ Polymorphism—a characteristic that greatly reduces the
effort required to extend the design
Design Classes
■ Analysis classes are refined during design to become entity
classes

■ Boundary classes are developed during design to create the interface


(e.g., interactive screen or printed reports) that the user sees and
interacts with as the software is used.

■ Boundary classes are designed with the


responsibility of managing the way entity objects are represented
to users.
■ Controller classes are designed to manage
■ the creation or update of entity objects;
■ the instantiation of boundary objects as they obtain information
from entity objects;
■ complex communication between sets of objects;
■ validation of data communicated between
objects or between the user and the application.
high

a na ly sis m
ode l
class diagrams use-cases - t
analysis packages ext use-case class diagrams

The CRC models


collaborat ion
diagrams
diagrams act
ivit y diagrams
sw im lane
analysis
packages CRC
Requirement s:
const raint s
models int eroperabilit y
dat a f low diagrams diagrams

Design cont rol-f low


diagrams processing
collaborat ion
diagrams st at e
collaborat ion
diagrams dat a f low
diagrams cont rol-f
t arget s and
conf igurat ion
narrat ives diagrams
Model sequence
diagrams
low diagrams
processing narrat
ives st at e
design class realizat diagrams sequence
ions subsyst ems
t echnical int erf
diagrams
collaborat ion component
diagrams ace design design class
diagrams design
Navigat ion realizat ions
design classes
subsyst ems
GUI design act ivit y diagrams
collaborat ion
de sign m sequence
diagrams
ode l diagrams
component
ref inement s t o: diagrams
design class realizat design classes
ions subsyst ems
ref inement s t o: act ivit y
lo collaborat ion
component diagrams diagrams
diagrams
w design classes deployment
sequence
act ivit y diagrams diagrams
diagrams
sequence diagrams

component -level deployment


archit ect ure int erface
-level element s
element s element s
element s
process
dimension
Design Model Elements
■ Data elements
■ Data model --> data structures
■ Data model --> database architecture
■ Architectural elements
■ Application domain
■ Analysis classes, their relationships, collaborations and behaviors
are transformed into design realizations
■ Patterns and “styles” (Chapters 9 and 12)
■ Interface elements
■ the user interface (UI)
■ external interfaces to other systems, devices, networks or other
producers or consumers of information
■ internal interfaces between various design components.
■ Component elements
■ Deployment elements
Architectural Elements
■ The architectural model [Sha96] is derived from three
sources:
■ information about the application domain for the software to
be built;
■ specific requirements model elements such as data flow diagrams
or analysis classes, their relationships and collaborations for the
problem at hand, and
■ the availability of architectural patterns and styles
MobilePhone

Interface Design WirelessPD


A

Elements

Cont rolPanel Key


LCDdisplay Pad
LEDindicat ors
keyPadCharact erist
ics speaker
wirelessInt erf ace
readKeySt roke()
decodeKey ()
displaySt at us() < < int erface> >
light LEDs() Key Pad
sendCont
rolMsg()
readKeyst roke()
decodeKey()

UML int erface represent at ion for Co n t ro l Pa n e l


Component
Elements

Sensor Management
Sensor
Cont rol CPI
Panel server
Security homeow

Deployment nerAcces
s

Elements

Personal comput
er

extern
alAcc
ess

Security Surveillan
ce

communic
homeMan
ation
agement

30
.
Thank you

You might also like