Module 2 Sep
Module 2 Sep
REQUIREMENTS ENGINEERING
Requirements analysis, also called requirements engineering, is the process of
determining user expectations for a new or modified product. Requirements engineering is a major
software engineering action that begins during the communication activity and continues into
the modeling activity. It must be adapted to the needs of the process, the project, the product, and
the people doing the work. Requirements engineering builds a bridge to design and construction.
Requirements engineering provides the appropriate mechanism for understanding what the
customer wants, analyzing need, assessing feasibility, negotiating a reasonable solution, specifying
the solution unambiguously, validating the specification, and managing the requirements as they
are transformed into an operational system. It encompasses seven distinct tasks: inception,
elicitation, elaboration, negotiation, specification, validation, and management.
Inception : It establish a 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 other stakeholders and the software team.
WWW.JNTUKNOTES.COM 33
fits into the needs of the business, and finally, how the system or product is to be used on a day-
to-day basis.
Elaboration: The information obtained from the customer during inception and elicitation is
expanded and refined during elaboration. This task focuses on developing a refined requirements
model that identifies various aspects of software function, behavior, and information. Elaboration
is driven by the creation and refinement of user scenarios that describe how the end user (and other
actors) will interact with the system.
WWW.JNTUKNOTES.COM 34
53
omissions, and errors have been detected and corrected; and that the work products conform to the
standards established for the process, the project, and the product.
The primary requirements validation mechanism is the technical review. The review team
that validates requirements includes software engineers, customers, users, and other stakeholders
who examine the specification looking for errors in content or interpretation, areas where
clarification may be required, missing information, inconsistencies, conflicting requirements, or
unrealistic requirements.
Requirements management. Requirements for computer-based systems change, and the desire
to change requirements persists throughout the life of the system. Requirements management is a
set of activities that help the project team identify, control, and track requirements and changes to
requirements at any time as the project proceeds. Many of these activities are identical to the
software configuration management (SCM) techniques.
WWW.JNTUKNOTES.COM 35
collaborate by providing their view of requirements, but a strong “project champion” (e.g., a
business manager or a senior technologist) may make the final decision about which requirements
make the cut.
WWW.JNTUKNOTES.COM 36
• Can anyone else provide additional information?
• Should I be asking you anything else?
These questions will help to “break the ice” and initiate the communication that is essential to
successful elicitation. But a question-and-answer meeting format is not an approach that has been
overwhelmingly successful.
ELICITING REQUIREMENTS
Requirements elicitation (also called requirements gathering) combines elements of problem
solving, elaboration, negotiation, and specification
Collaborative Requirements Gathering
Many different approaches to collaborative requirements gathering have been proposed. Each makes
use of a slightly different scenario, but all apply some variation on the following basic guidelines:
• Meetings are conducted and attended by both software engineers and other stakeholders.
• Rules for preparation and participation are established.
• An agenda is suggested that is formal enough to cover all important points but informal
enough to encourage the free flow of ideas.
• 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 in an atmosphere that is
conducive to the accomplishment of the goal.
During inception basic questions and answers establish the scope of the problem and the
overall perception of a solution. Out of these initial meetings, the developer and customers write
a one- or two-page “product request.”
WWW.JNTUKNOTES.COM 37
A meeting place, time, and date are selected; a facilitator is chosen; and attendees from the
software team and other stakeholder organizations are invited to participate. The product request
is distributed to all attendees before the meeting date.
While reviewing the product request in the days before the meeting, each attendee is asked
to make a list of objects that are part of the environment that surrounds the system, other objects
that are to be produced by the system, and objects that are used by the system to perform its
functions. In addition, each attendee is asked to make another list of services that manipulate or
interact with the objects. Finally, lists of constraints (e.g., cost, size, business rules) and
performance criteria (e.g., speed, accuracy) are also developed. The attendees are informed that
the lists are not expected to be exhaustive but are expected to reflect each person’s perception of
the system.
The lists of objects can be pinned to the walls of the room using large sheets of paper, stuck
to the walls using adhesive-backed sheets, or written on a wall board. After individual lists are
presented in one topic area, the group creates a combined list by eliminating redundant entries,
adding any new ideas that come up during the discussion, but not deleting anything.
Quality Function Deployment
Quality function deployment (QFD) is a quality management technique that translates the
needs of the customer into technical requirements for software. QFD “concentrates on
maximizing customer satisfaction from the software engineering process”. To accomplish this,
QFD emphasizes an understanding of what is valuable to the customer and then deploys these
values throughout the engineering process. QFD identifies three types of requirements :
• Normal requirements. The objectives and goals that are stated for a product or system
during meetings with the customer. If these requirements are present, the customer is
satisfied. Examples of normal requirements might be requested types of graphical displays,
specific system functions, and defined levels of performance.
• Expected requirements. These requirements are implicit to the product or system and may
be so fundamental that the customer does not explicitly state them. Their absence will be a
cause for significant dissatisfaction.
• Exciting requirements. These features go beyond the customer’s expectations and prove
to be very satisfying when present.
WWW.JNTUKNOTES.COM 38
Although QFD concepts can be applied across the entire software process, QFD uses customer
interviews and observation, surveys, and examination of historical data as raw data for the
requirements gathering activity. These data are then translated into a table of requirements— called
the customer voice table—that is reviewed with the customer and other stakeholders. Usage
Scenarios
As requirements are gathered, an overall vision of system functions and features begins to
materialize. However, it is difficult to move into more technical software engineering activities
until you understand how these functions and features will be used by different classes of end
users. To accomplish this, developers and users can create a set of scenarios that identify a thread
of usage for the system to be constructed. The scenarios, often called use cases, provide a
description of how the system will be used.
WWW.JNTUKNOTES.COM 39
The first step in writing a use case is to define the set of “actors” that will be involved in
the story. Actors are the different people (or devices) that use the system or product within the
context of the function and behavior that is to be described.
Actors represent the roles that people (or devices) play as the system operates. Defined
somewhat more formally, an actor is anything that communicates with the system or product and
that is external to the system itself. Every actor has one or more goals when using the system. It
is important to note that an actor and an end user are not necessarily the same thing. A typical user
may play a number of different roles when using a system, whereas an actor represents a class of
external entities (often, but not always, people) that play just one role in the context of the use case.
Different people may play the role of each actor.
Because requirements elicitation is an evolutionary activity, not all actors are identified
during the first iteration. It is possible to identify primary actors during the first iteration and
secondary actors as more is learned about the system.
Primary actors interact to achieve required system function and derive the intended benefit
from the system. Secondary actors support the system so that primary actors can do their work.
Once actors have been identified, use cases can be developed.
Jacobson suggests a number of questions that should be answered by a use case:
• Who is the primary actor, the secondary actor(s)?
• What are the actor’s goals?
• What preconditions should exist before the story begins?
• What main tasks or functions are performed by the actor?
• What exceptions might be considered as the story is described?
• What variations in the actor’s interaction are possible?
• What system information will 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?
The basic use case presents a high-level story that describes the interaction between the actor and
the system.
WWW.JNTUKNOTES.COM 40
BUILDING THE REQUIREMENTS MODEL
The intent of the analysis model is to provide a description of the required informational,
functional, and behavioral domains for a computer-based system. The model changes dynamically
as you learn more about the system to be built, and other stakeholders understand more about what
they really require..
Elements of the Requirements Model
The specific elements of the requirements model are dictated by the analysis modeling method that
is to be used. However, a set of generic elements is common to most requirements models.
• Scenario-based elements. The system is described from the user’s point of view using a
scenario-based approach.
• Class-based elements. Each usage scenario implies a set of objects that are manipulated
as an actor interacts with the system. These objects are categorized into classes a collection
of things that have similar attributes and common behaviors.
• Behavioral elements. The behavior of a computer-based system can have a profound effect
on the design that is chosen and the implementation approach that is applied. Therefore,
the requirements model must provide modeling elements that depict behavior.
• Flow-oriented elements. Information is transformed as it flows through a computer- based
system. The system accepts input in a variety of forms, applies functions to transform it,
and produces output in a variety of forms.
Analysis Patterns
Analysis patterns suggest solutions (e.g., a class, a function, a behavior) within the
application domain that can be reused when modeling many applications.
Geyer-Schulz and Hahsler suggest two benefits that can be associated with the use of
analysis patterns:
WWW.JNTUKNOTES.COM 41
First, analysis patterns speed up the development of abstract analysis models that capture the main
requirements of the concrete problem by providing reusable analysis models with examples as well
as a description of advantages and limitations.
Second, analysis patterns facilitate the transformation of the analysis model into a design model
by suggesting design patterns and reliable solutions for common problems.
Analysis patterns are integrated into the analysis model by reference to the pattern name.
NEGOTIATING REQUIREMENTS
The intent of negotiation is to develop a project plan that meets stakeholder needs while at
the same time reflecting the real-world constraints (e.g., time, people, budget) that have been
placed on the software team. The best negotiations strive for a “win-win” result. That is,
stakeholders win by getting the system or product that satisfies the majority of their needs and you
win by working to realistic and achievable budgets and deadlines.
Boehm defines a set of negotiation activities at the beginning of each software process
iteration. Rather than a single customer communication activity, the following activities are
defined:
1. Identification of the system or subsystem’s key stakeholders.
2. Determination of the stakeholders’ “win conditions.”
3. Negotiation of the stakeholders’ win conditions to reconcile them into a set of win-win
conditions for all concerned.
Successful completion of these initial steps achieves a win-win result, which becomes the key
criterion for proceeding to subsequent software engineering activities.
VALIDATING REQUIREMENTS
As each element of the requirements model is created, it is examined for inconsistency,
omissions, and ambiguity. The requirements represented by the model are prioritized by the
stakeholders and grouped within requirements packages that will be implemented as software
increments.
A review of the requirements model addresses the following questions:
• Is each requirement consistent with the overall objectives for the system/product?
WWW.JNTUKNOTES.COM 42
• 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?
• 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 and other questions should be asked and answered to ensure that the requirements model
is an accurate reflection of stakeholder needs and that it provides a solid foundation for design.
WWW.JNTUKNOTES.COM 43
[email protected]
Fig : The requirements model as a bridge between the system description and the design model
Behavioral elements depict how external events change the state of the system or the
classes that reside within it. Finally,
Flow-oriented elements represent the system as an information transform, depicting how
data objects are transformed as they flow through various system functions.
SCENARIO-BASED MODELING
Scenario-based elements depict how the user interacts with the system and the specific
sequence of activities that occur as the software is used.
Creating a Preliminary Use Case
Alistair Cockburn characterizes a use case as a “contract for behavior”, the “contract”
defines the way in which an actor uses a computer-based system to accomplish some goal. In
essence, a use case captures the interactions that occur between producers and consumers of
information and the system itself.
A use case describes a specific usage scenario in straightforward language from the point of
view of a defined actor. These are the questions that must be answered if use cases are to provide
value as a requirements modeling tool. (1) what to write about, (2) how much to write about it,
(3) how detailed to make your description, and (4) how to organize the description?
To begin developing a set of use cases, list the functions or activities performed by a
specific actor.
Refining a Preliminary Use Case
Each step in the primary scenario is evaluated by asking the following questions:
[email protected]
However, scenario-based modeling is appropriate for a significant majority of all situations that
you will encounter as a software engineer.
Data Attributes
Data attributes define the properties of a data object and take on one of three different
characteristics. They can be used to (1) name an instance of the data object, (2) describe the
instance, or (3) make reference to another instance in another table.
Relationships
Data objects are connected to one another in different ways. Consider the two data objects,
person and car. These objects can be represented using the following simple notation and
relationships are 1) A person owns a car, 2) A person is insured to drive a car
CLASS-BASED MODELING
Class-based modeling represents the objects that the system will manipulate, the
operations that will be applied to the objects to effect the manipulation, relationships between the
objects, and the collaborations that occur between the classes that are defined. The elements of a
class-based model include classes and objects, attributes, operations, class responsibility-
collaborator (CRC) models, collaboration diagrams, and packages.
Identifying Analysis Classes
We can begin to identify classes by examining the usage scenarios developed as part of
the requirements model and performing a “grammatical parse” on the use cases developed for
the system to be built.
[email protected]
.2 Specifying Attributes
Attributes describe a class that has been selected for inclusion in the requirements model.
In essence, it is the attributes that define the class—that clarify what is meant by the class in the
context of the problem space.
To develop a meaningful set of attributes for an analysis class, you should study each use
case and select those “things” that reasonably “belong” to the class.
Defining Operations
Operations define the behavior of an object. Although many different types of operations exist,
they can generally be divided into four broad categories: (1) operations that manipulate data in
some way (e.g., adding, deleting, reformatting, selecting), (2) operations that perform a
computation, (3) operations that inquire about the state of an object, and (4) operations that
monitor an object for the occurrence of a controlling event.
• Boundary classes are used to create the interface 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 manage a “unit of work” from start to finish. That is, controller classes
can be designed to manage (1) the creation or update of entity objects, (2) the
instantiation of boundary objects as they obtain information from entity objects, (3)
complex communication between sets of objects, (4) validation of data communicated
between objects or between the user and the application. In general, controller classes are
not considered until the design activity has begun.
Responsibilities : Wirfs-Brock and her colleagues suggest five guidelines for allocating
responsibilities to classes:
1. System intelligence should be distributed across classes to best address the needs of
the problem. Every application encompasses a certain degree of intelligence; that is,
what the system knows and what it can do.
2. Each responsibility should be stated as generally as possible. This guideline implies
that general responsibilities should reside high in the class hierarchy
3. Information and the behavior related to it should reside within the same class. This
achieves the object-oriented principle called encapsulation. Data and the processes that
manipulate the data should be packaged as a cohesive unit.
4. Information about one thing should be localized with a single class, not distributed
across multiple classes. A single class should take on the responsibility for storing and
manipulating a specific type of information. This responsibility should not, in general, be
shared across a number of classes. If information is distributed, software becomes more
difficult to maintain and more challenging to test.
5. Responsibilities should be shared among related classes, when appropriate. There
are many cases in which a variety of related objects must all exhibit the same behavior at the
same time.
Collaborations. Classes fulfill their responsibilities in one of two ways:
1. A class can use its own operations to manipulate its own attributes, thereby fulfilling a
particular responsibility, or
2. A class can collaborate with other classes.
[email protected]
When a complete CRC model has been developed, stakeholders can review the model using
the following approach :
1. 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).
2. All use-case scenarios (and corresponding use-case diagrams) should be organized into
categories.
3. 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.
4. When the token is passed, the holder of the 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.
5. 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.
Associations and Dependencies
An association defines a relationship between classes. An association may be further defined
by indicating multiplicity. Multiplicity defines how many of one class are related to how many
of another class.
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.
Dependencies are defined by a stereotype. A stereotype is an “extensibility mechanism” within
UML that allows you to define a special modeling element whose semantics are custom defined.
In UML. Stereotypes are represented in double angle brackets (e.g., <<stereotype>>).
[email protected]
Fig : Multiplicity
Fig : Dependencies
Analysis Packages
An important part of analysis modeling is categorization. That is, various elements of the
analysis model (e.g., use cases, analysis classes) are categorized in a manner that packages them
as a grouping—called an analysis package—that is given a representative name.
Fig : Packages
[email protected]
One view of requirements modeling, called structured analysis,. Data objects are
modeled in a way that defines their attributes and relationships. Processes that manipulate data
objects are modeled in a manner that shows how they transform data as data objects flow through
the system.
A second approach to analysis modeled, called object-oriented analysis, focuses on the
definition of classes and the manner in which they collaborate with one another to effect
customer requirements.
FLOW-ORIENTED MODELING
foolproof, but it can provide you with an excellent jump start, if you’re struggling to define data
objects and the transforms that operate on them.
The processes represented at DFD level 1 can be further refined into lower levels. The
refinement of DFDs continues until each bubble performs a simple function. That is, until the
process represented by the bubble performs a function that would be easily implemented as a
program component. a concept, Cohesion can be used to assess the processing focus of a given
function. i.e refine DFDs until each bubble is “single-minded.”
The behavioral model indicates how software will respond to external events or stimuli.
To create the model, you should perform the following steps:
1. Evaluate all use cases to fully understand the sequence of interaction within the
system.
2. Identify events that drive the interaction sequence and understand how these events
relate to specific objects.
3. Create a sequence for each use case.
4. Build a state diagram for the system.
5. Review the behavioral model to verify accuracy and consistency.
Identifying Events with the Use Case
The use case represents a sequence of activities that involves actors and the system. In
general, an event occurs whenever the system and an actor exchange information. A use case is
examined for points of information exchange. To illustrate, we reconsider the use case for a
portion of the SafeHome security function. The homeowner uses the keypad to key in a four-digit
password. The password is compared with the valid password stored in the system. If the
password is incorrect, the control panel will beep once and reset itself for additional input. If the
password is correct, the control panel awaits further action.
The underlined portions of the use case scenario indicate events. An actor should be
identified for each event; the information that is exchanged should be noted, and any conditions
or constraints should be listed. Once all events have been identified, they are allocated to the
objects involved. Objects can be responsible for generating events .
State Representations
In the context of behavioral modeling, two different characterizations of states must be
considered: (1) the state of each class as the system performs its function and (2) the state of the
system as observed from the outside as the system performs its Function Two different
behavioral representations are discussed in the paragraphs that follow. The first indicates how
[email protected]
an individual class changes state based on external events and the second shows the behavior of
the software as a function of time.
State diagrams for analysis classes. One component of a behavioral model is a UML state
diagram that represents active states for each class and the events (triggers) that cause changes
between these active states. The following figure illustrates a state diagram for the ControlPanel
object in the SafeHome security function. Each arrow shown in figure represents a transition
from one active state of an object to another. The labels shown for each arrow represent the event
that triggers the transition
Software patterns are a mechanism for capturing domain knowledge in a way that allows
it to be reapplied when a new problem is encountered. In some cases, the domain knowledge is
applied to a new problem within the same application domain. The domain knowledge captured
by a pattern can be applied by analogy to a completely different application domain.
The pattern can be reused when performing requirements modeling for an application
within a domain. Analysis patterns are stored in a repository so that members of the software
team can use search facilities to find and reuse them. Once an appropriate pattern is selected, it
is integrated into the requirements model by reference to the pattern name.
Discovering Analysis Patterns
The requirements model is comprised of a wide variety of elements: scenario-based (use
cases), data-oriented (the data model), class-based, flow-oriented, and behavioral. Each of
these elements examines the problem from a different perspective, and each provides an
opportunity to discover patterns that may occur throughout an application domain, or by analogy,
across different application domains.
The most basic element in the description of a requirements model is the use case. Use
cases may serve as the basis for discovering one or more analysis patterns.
A semantic analysis pattern (SAP) “is a pattern that describes a small set of coherent
use cases that together describe a basic generic application”
[email protected]
Requirements analysis does take time, but solving the wrong problem takes even more
time.
How Much Analysis Is Enough?
The degree to which requirements modeling for WebApps is emphasized depends on the
following factors:
• Size and complexity of WebApp increment.
• Number of stakeholders
• Size of the WebApp team.
• Degree to which members of the WebApp team have worked together
• Degree to which the organization’s success is directly dependent on the success of the
design of a specific part of the WebApp.
It only demands an analysis of those requirements that affect only that part of the
WebApp.
Requirements Modeling Input
The requirements model provides a detailed indication of the true structure of the
problem and provides insight into the shape of the solution. Requirements analysis refines this
understanding by providing additional interpretation. As the problem structure is delineated as
part of the requirements model.
Requirements Modeling Output
Requirements analysis provides a disciplined mechanism for representing and evaluating
WebApp content and function, the modes of interaction that users will encounter, and the
environment and infrastructure in which the WebApp resides. Each of these characteristics can
be represented as a set of models that allow the WebApp requirements to be analyzed in a
structured manner. While the specific models depend largely upon the nature of the WebApp,
there are five main classes of models:
• Content model—identifies the full spectrum of content to be provided by the WebApp.
Content includes text, graphics and images, video, and audio data.
• Interaction model—describes the manner in which users interact with the WebApp.
[email protected]
• Functional model—defines the operations that will be applied to WebApp content and
describes other processing functions that are independent of content but necessary to the
end user.
• Navigation model—defines the overall navigation strategy for the WebApp.
• Configuration model—describes the environment and infrastructure in which the
WebApp resides.
4. Content. Model for WebApps
The content model contains structural elements that provide an important view of content
requirements for a WebApp. These structural elements encompass content objects and all
analysis classes, user-visible entities that are created or manipulated as a user interacts with the
Content can be developed prior to the implementation of the WebApp, while the WebApp is
being built, or long after the WebApp is operational.
A content object might be a textual description of a product, an article describing a news
event, an action photograph taken at a sporting event, a user’s response on a discussion forum, an
animated representation of a corporate logo, a short video of a speech, or an audio overlay for a
collection of presentation slides. The content objects might be stored as separate files, embedded
directly into Web pages, or obtained dynamically from a database. Content objects can be
determined directly from use cases by examining the scenario description for direct and indirect
references to content. The content model must be capable of describing the content object
Component.
Interaction Model for WebApps
Interaction model that can be composed of one or more of the following elements: (1) use
cases, (2) sequence diagrams, (3) state diagrams,16 and/or (4) user interface prototypes.
Functional Model for WebApps
The functional model addresses two processing elements of the WebApp, each representing a
different level of procedural abstraction: (1) user-observable functionality that is delivered by the
WebApp to end users, and (2) the operations contained within analysis classes that implement
behaviors associated with the class.
User-observable functionality encompasses any processing functions that are initiated
directly by the user.
[email protected]