Module 2
Module 2
Understanding Requirements:
1. Requirements Engineering
2. Establishing the ground work
3. Eliciting Requirements
4. Developing use cases
5. Building the requirements model
6. Negotiating Requirements
7. Validating Requirements
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.
The steps required to establish the groundwork for an understanding of software requirements:
1. Identifying stakeholders
2. Recognizing multiple viewpoints
3. Working towards collaboration
4. Asking the first questions
Establishing the ground work - Identifying stakeholders
Stakeholders can include business operations managers, product managers, marketing
personnel, customers (internal and external), end users, consultants, engineers (product,
software, support, and maintenance), and others. Each stakeholder has unique perspectives,
benefits, and risks associated with the project's success or failure. At the inception of a
project, it's crucial to identify and list all stakeholders who will provide input during the
requirements elicitation process, with the list expanding as more stakeholders are identified
through referrals.
Establishing the ground work - Recognizing
multiple viewpoints
The requirements engineering process involves gathering inputs from various stakeholders,
each with different perspectives and priorities:
Marketing Group: Focuses on features that will attract potential customers and facilitate sales.
Business Managers: Prioritize a feature set that can be developed within budget and within
the required timeline.
End Users: Desire familiar, easy-to-learn, and user-friendly features.
Software Engineers: Concerned with underlying functions that support visible features and
overall system infrastructure.
Support Engineers: Emphasize the maintainability of the software.
These diverse viewpoints contribute to a comprehensive set of requirements. However, this
can lead to inconsistencies and conflicts. The gathered information should be categorized to
help decision-makers select a coherent and consistent set of system requirements.
Establishing the ground work - Recognizing
multiple viewpoints
The requirements engineering process involves gathering inputs from various stakeholders,
each with different perspectives and priorities:
Marketing Group: Focuses on features that will attract potential customers and facilitate sales.
Business Managers: Prioritize a feature set that can be developed within budget and within
the required timeline.
End Users: Desire familiar, easy-to-learn, and user-friendly features.
Software Engineers: Concerned with underlying functions that support visible features and
overall system infrastructure.
Support Engineers: Emphasize the maintainability of the software.
These diverse viewpoints contribute to a comprehensive set of requirements. However, this
can lead to inconsistencies and conflicts. The gathered information should be categorized to
help decision-makers select a coherent and consistent set of system requirements.
Establishing the ground work - Recognizing
multiple viewpoints
The requirements engineering process involves gathering inputs from various stakeholders,
each with different perspectives and priorities:
Marketing Group: Focuses on features that will attract potential customers and facilitate sales.
Business Managers: Prioritize a feature set that can be developed within budget and within
the required timeline.
End Users: Desire familiar, easy-to-learn, and user-friendly features.
Software Engineers: Concerned with underlying functions that support visible features and
overall system infrastructure.
Support Engineers: Emphasize the maintainability of the software.
These diverse viewpoints contribute to a comprehensive set of requirements. However, this
can lead to inconsistencies and conflicts. The gathered information should be categorized to
help decision-makers select a coherent and consistent set of system requirements.
Establishing the ground work - Working
toward Collaboration
When multiple stakeholders are involved, each may have different requirements and priorities.
The challenge is of managing differing opinions among stakeholders in a software project.
Effective collaboration is essential for project success. The role of a requirements engineer is
to identify common requirements and resolve conflicts or inconsistencies among stakeholders.
Collaboration involves stakeholders sharing their views, but ultimately, a strong project
champion (such as a business manager or senior technologist) often makes the final decision
on which requirements to prioritize and implement.
Establishing the ground work - Asking the
first questions
Questions asked at the inception of the project should be “context free”. The first set of
context-free questions focuses on the customer and other stakeholders, the overall project
goals and benefits. For example, you might ask:
These questions help to identify all stakeholders who will have interest in the software to be
built. In addition, the questions identify the measurable benefit of a successful
implementation and possible alternatives to custom software development.
Establishing the ground work - Asking the first
questions contd….
The next set of questions enables you to gain a better understanding of the problem and
allows the customer to voice his or her perceptions about a solution:
• How would you characterize “good” output that would be generated by a successful
solution?
• What problem(s) will this solution address?
• Can you show me (or describe) the business environment in which the solution will be
used?
• Will special performance issues or constraints affect the way the solution is approached?
These questions (and others) 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. In fact, the Q&A session should be
used for the first encounter only and then replaced by a requirements elicitation format
that combines elements of problem solving, negotiation, and specification
Establishing the ground work - Asking the first
questions contd….
The final set of questions focuses on the effectiveness of the communication
activity itself. Gause and Weinberg [Gau89] call these “meta-questions” and propose
the following (abbreviated) list:
• Are you the right person to answer these questions? Are your answers
“official”?
• Are my questions relevant to the problem that you have?
• Am I asking too many questions?
• Can anyone else provide additional information?
• Should I be asking you anything else?
Eliciting Requirements
Requirements elicitation (also called requirements gathering) combines elements of problem
solving, elaboration, negotiation, and specification. In order to encourage a collaborative,
team-oriented approach to requirements gathering, stakeholders work together to identify the
problem, propose elements of the solution, negotiate different approaches and specify a
preliminary set of solution requirements.
Approaches-
1. Collaborative Requirements Gathering
2. Quality Function Deployment
3. Usage Scenarios
4. Elicitation Work Products
Eliciting Requirements - Collaborative
Requirements Gathering
Steps followed:
1. Meetings are conducted and attended by both software engineers and other stakeholders.
2. Rules for preparation and participation are established.
3. An agenda is suggested that is formal enough to cover all important points but informal
enough to encourage the free flow of ideas.
4. A “facilitator” (can be a customer, a developer, or an outsider) controls the meeting.
5. A “definition mechanism” (can be work sheets, flip charts, or wall stickers or an electronic
bulletin board, chat room, or virtual forum) is used.
Eliciting Requirements - Collaborative
Requirements Gathering Contd…
The process of identifying problems, proposing solutions, and gathering requirements in a software project
through collaborative meetings. The sequence of events involves:
1. Inception: Initial meetings establish the problem's scope and outline a potential solution. A brief "product
request" document is created, summarizing the basic requirements.
2. Preparation for the Meeting: A meeting is scheduled, a facilitator is chosen, and the product request is
distributed to all participants. Attendees prepare by listing relevant objects, services, constraints, and
performance criteria related to the system.
3. During the Meeting:
a) Object and Service Lists: Participants present and combine their lists of objects (e.g., control panel,
sensors) and services (e.g., setting the alarm, monitoring sensors).
b) Consensus Building: Redundant entries are eliminated, new ideas are added, and a consensus list is
developed without critique.
c) Mini-Specifications: Detailed explanations (mini-specs) of objects and services are created, discussed, and
refined.
4. Post-Meeting: Further elaboration of the mini-specs and lists might reveal new requirements, which are added
to the original lists. Unresolved issues are documented for later resolution.
The goal is to collaboratively create a comprehensive and agreed-upon set of requirements that accurately
reflects the system to be developed.
Eliciting Requirements - Quality Function
Deployment
Quality Function Deployment (QFD) is a quality management technique designed to translate customer needs
into technical requirements for software, with a focus on maximizing customer satisfaction. QFD emphasizes
understanding what is valuable to the customer and incorporating these values throughout the engineering
process.
QFD identifies three types of requirements:
1. Normal Requirements: These are explicitly stated objectives and goals from the customer. Meeting these
requirements satisfies the customer. Examples include specific graphical displays, system functions, and
performance levels.
2. Expected Requirements: These are implicit and fundamental expectations that customers may not explicitly
state but expect to be present. Their absence causes significant dissatisfaction. Examples include ease of use,
operational correctness, reliability, and ease of installation.
3. Exciting Requirements: These are features that exceed customer expectations and provide high satisfaction.
Examples include unexpected capabilities like multitouch screens or visual voicemail in mobile phone
software.
QFD techniques, particularly during requirements elicitation, involve gathering data through customer interviews,
observations, surveys, and historical data analysis. This data is compiled into a customer voice table, reviewed
with stakeholders, and analyzed using various diagrams, matrices, and evaluation methods to identify expected
and exciting requirements.
Eliciting Requirements - Usage Scenarios
As requirements are gathered, an overall vision of system functions and features begins to
materialize.
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.
Eliciting Requirements - Elicitation Work
Products
The work products include:
Each of these work products is reviewed by all people who have participated in requirements
elicitation.
Developing use cases
A use case captures a "contract" describing a system's behavior in response to stakeholder requests. It
tells a story of how an end user interacts with the system under specific conditions, using various forms
such as narrative text, task outlines, templates, or diagrams.
To create a use case, the first step is defining the "actors“.
Actors are different people or devices that interact with the system. Actors represent roles that entities
play in the system's context, and while they often involve end users, they are not necessarily the same.
An actor can represent a class of external entities playing one role, while a user might take on multiple
roles.
For example, a machine operator might interact with a control computer in different modes—
programming, testing, monitoring, and troubleshooting—leading to the definition of four actors:
programmer, tester, monitor, and troubleshooter. The same person could play all these roles, or they
could be played by different individuals.
As requirements are iteratively refined, primary actors (those who interact frequently with the system
to achieve its main functions) are identified first, followed by secondary actors (those who support the
primary actors) as the system is better understood.
Developing use cases
Contd…
Number of questions that should be answered by a use case:
Following example is
the process a homeowner follows to activate the SafeHome
security system using the control panel:
1.System Readiness: The homeowner checks the control
panel to see if the system is ready for input. If it displays a
"not ready" message (indicating an open sensor, such as a
door is open or window is open), they must close the open
sensor.
2.Password Entry: The homeowner enters a four-digit
password. If incorrect, the control panel beeps and resets. If
correct, the system is ready for further action.
3.System Activation: The homeowner selects "stay"
(activating only perimeter sensors) or "away" (activating all
sensors).
4.Confirmation: Upon activation, a red alarm light indicates
the system is active.
Building the Requirements Model
Elements of the Requirements
Model
Analysis Patterns
Elements of the Requirements Model
1. Scenario-based elements
2. Class-based elements
3. Behavioral elements
UML use case Class diagram of
4. Flow-oriented elements diagram for sensor
SafeHome home
security function
UML activity diagrams for eliciting requirements
Building the Requirements Model
Elements of the Requirements
Model
Analysis Patterns
Each usage scenario implies
Elements of the Requirements Model a set of objects that are
manipulated as an actor
1. Scenario-based elements interacts with the system.
2. Class-based elements
These objects are
3. Behavioral elements categorized into classes—a
collection of things that Class diagram of
4. Flow-oriented elements have similar attributes and sensor
common behaviors.
Building the Requirements Model
Elements of the Requirements • The behavior of a computer-based
system can have a profound effect on
Model the design that is chosen and the
implementation approach that is
Analysis Patterns applied.
Elements of the Requirements • Therefore, the requirements model
must provide modeling elements that
Model depict behavior.
1. Scenario-based elements • The state diagram is one method for
representing the behavior of a system
2. Class-based elements by depicting its states and the events
that cause the system to change state. A simplified UML
3. Behavioral elements A state is any externally observable state diagram
mode of behavior. In addition, the state
4. Flow-oriented elements diagram indicates actions (e.g., process
activation) taken as a consequence of a
particular event.
Building the Requirements Model
Elements of the Requirements Information is transformed as it flows
Model
through a computer-based system.
Analysis Patterns The system accepts input in a variety
Elements of the Requirements of forms, applies functions to
Model transform it, and produces output in a
1. Scenario-based elements variety of forms.
2. Class-based elements
3. Behavioral elements
4. Flow-oriented elements
Building the Requirements Model
Elements of the Requirements Model
Analysis Patterns
Anyone who has done requirements engineering on more than a few software
projects begins to notice that certain problems reoccur across all projects within
a specific application domain. These analysis patterns suggest solutions within
the application domain that can be reused when modeling many applications.
Analysis patterns are integrated into the analysis model by giving Pattern
reference name.
Negotiating Requirements
In most cases, stakeholders are asked to balance functionality, performance, and other
product or system characteristics against cost and time-to-market. The intent of this
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 role of the domain analyst is to discover and define analysis patterns, analysis classes, and related
information that may be used by many people working on similar but not necessarily the same applications
Requirement Analysis-
Requirements Modeling Approaches
1. Requirements modeling, called structured analysis: considers data and the processes that transform the
data.
2. Analysis modeling, called object-oriented analysis, focuses on the definition of classes and the manner in
which they collaborate with one another to effect customer requirements
Elements of
the analysis
model
Scenario based Modeling
Steps To begin developing a set of use cases, list the functions or
activities performed by a specific actor.
1. Creating a Primary Use You can obtain these from a list of required system functions,
Case through conversations with stakeholders, or by an evaluation
of activity diagrams developed as part of requirements
2. Refining a Preliminary Use modeling.
Case
3. Writing
Example: Thea Formal Use home
SafeHome Case surveillance function - homeowner (actor)
Functions:
• Select camera to view.
• Request thumbnails from all cameras.
• Display camera views in a PC window.
• Control pan and zoom for a specific camera.
• Selectively record camera output.
• Replay camera output.
• Access camera surveillance via the Internet.
Scenario based Modeling – 1. Creating a Primary Use Case
Use case: Access camera surveillance via the Internet—display camera views
(ACS-DCV)
Actor: homeownerNarration Ordered sequence of user actions
If I’m at a remote location, I can use any PC with appropriate The homeowner logs onto the SafeHome
browser software to log on to the SafeHome Products website. Products website.
I enter my user ID and two levels of passwords and once I’m The homeowner enters his or her user ID.
validated, I have access to all functionality for my installed The homeowner enters two passwords (each at
SafeHome system. least eight characters in length).
The system displays all major function buttons.
To access a specific camera view, I select “surveillance” from the The homeowner selects the “surveillance” from
major function buttons displayed. the major function buttons.
I then select “pick a camera” and the floor plan of the house is The homeowner selects “pick a camera”.
displayed. The system displays the floor plan of the house.
Scenario based Modeling – 1. Creating a Primary Use Case
Use case: Access camera surveillance via the Internet—display camera views
(ACS-DCV)
Actor: homeownerNarration Ordered sequence of user actions
I then select the camera that I’m interested in. The homeowner selects a camera icon from the
Alternatively, I can look at thumbnail snapshots from all floor plan
cameras simultaneously by selecting “all cameras” as my
viewing choice
Once I choose a camera, I select “view” and a one-frame-per- The homeowner selects the “view” button.
second view appears in a viewing window that is identified by The system displays a viewing window that is
the camera ID. identified by the camera ID.
The system displays video output within the
viewing window at one frame per second.
If I want to switch cameras, I select “pick a camera” and the original viewing window disappears and the floor plan
of the house is displayed again. I then select the camera that I’m interested in. A new viewing window appears.
Scenario based Modeling
Steps Each step in the primary scenario is evaluated by asking the following
questions:
1. Creating a Primary Use Case • Can the actor take some other action at this point?
• Is it possible that the actor will encounter some error condition at this
2. Refining a Preliminary
point? If so, what might it be?
Use Case • Is it possible that the actor will encounter some other behavior at this
3. Writing a Formal Use Case point (e.g., behavior that is invoked by some event outside the actor’s
control)? If so, what might it be?
Primary scenario -Narration Ordered sequence of user actions
I then select “pick a camera” and the floor plan of the house is The homeowner selects “pick a camera”.
displayed. The system displays the floor plan of the house.
1. Activity diagram
2. Swimlane diagrams
1. Activity diagram
2. Swimlane diagrams
Example:
Referring to the data object car, a
reasonable identifier might be the ID
number.
Data modeling Concepts- Relationships
Data objects are connected to one another in different ways. Consider the two data objects,
person and car.
Relationships,
For example,
• A person owns a car.
• A person is insured to drive a car.
Class-based modeling
Class-based modeling represents the objects that the system will manipulate,
the operations (also called methods or services) that will be applied to the
objects to effect the manipulation, relationships (some hierarchical) 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.
Class-based modeling - Identifying Analysis Classes
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. Classes are determined by
underlining each noun or noun phrase and entering it into a simple table. Synonyms should be noted. If the
class (noun) is required to implement a solution, then it is part of the solution space; otherwise, if a class is
necessary only to describe a solution, it is part of the problem space.
Analysis classes manifest themselves in one of the following ways:
• External entities (e.g., other systems, devices, people) that produce or consume information to
be used by a computer-based system.
• Things (e.g., reports, displays, letters, signals) that are part of the information domain for the
problem.
• Occurrences or events (e.g., a property transfer or the completion of a series of robot
movements) that occur within the context of system operation.
• Roles (e.g., manager, engineer, salesperson) played by people who interact with the system.
• Organizational units (e.g., division, group, team) that are relevant to an application.
• Places (e.g., manufacturing floor or loading dock) that establish the context of the problem and
the overall function of the system.
• Structures (e.g., sensors, four-wheeled vehicles, or computers) that define a class of objects or
related classes of objects.
Class-based modeling - Identifying Analysis Classes
Consider the narration: Extracting the nouns, we can propose a
number of potential classes:
Class-based modeling - Identifying Analysis Classes
Six selection characteristics that should be used in each potential class for inclusion in the analysis model:
1. Retained information. The potential class will be useful during analysis only if information about it must be
remembered so that the system can function.
2. Needed services. The potential class must have a set of identifiable operations that can change the value of
its attributes in some way.
3. Multiple attributes. During requirement analysis, the focus should be on “major” information; a class with a
single attribute may, in fact, be useful during design, but is probably better represented as an attribute of
another class during the analysis activity.
4. Common attributes. A set of attributes can be defined for the potential class and these attributes apply to
all instances of the class.
5. Common operations. A set of operations can be defined for the potential class and these operations apply
to all instances of the class.
6. Essential requirements. External entities that appear in the problem space and produce or consume
information essential to the operation of any solution for the system will almost always be defined as
classes in the requirements model.
Class-based modeling - Identifying Analysis Classes
The selection characteristics to the list of potential SafeHome classes:
Responsibilities are the attributes and operations that are relevant for the class.
Stated simply, a responsibility is “anything the class knows or does”.
Collaborators are those classes that are required to provide a class with the
information needed to complete a responsibility. In general, a collaboration
implies either a request for information or a request for some action.
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
A simple CRC index card for the FloorPlan
class is illustrated.
2. Boundary classes are used to create the interface (e.g., interactive screen or printed
reports) that the user sees and interacts with as the software is used.
3. Controller classes manage a “unit of work” from start to finish. That is, controller classes
can be designed to manage (i) the creation or update of entity objects, (ii) the
instantiation of boundary objects as they obtain information from entity objects, (iii)
complex communication between sets of objects, (iv) validation of data communicated
between objects or between the user and the application.
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
Responsibilities:
1. System intelligence should be distributed across classes to best address the needs of the
problem.
2. Each responsibility should be stated as generally as possible.
3. Information and the behavior related to it should reside within the same class.
4. Information about one thing should be localized with a single class, not distributed across
multiple classes.
5. Responsibilities should be shared among related classes, when appropriate.
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
Collaboration
Collaborations are identified by determining whether a class can fulfill each responsibility
itself. If it cannot, then it needs to interact with another class. Hence, a collaboration.
As an example, consider the SafeHome security function. As part of the activation procedure,
the ControlPanel object must determine whether any sensors are open. A responsibility
named determine-sensor-status() is defined. If sensors are open, ControlPanel must set a
status attribute to “not ready.” Sensor information can be acquired from each Sensor object.
Therefore, the responsibility determinesensor- status() can be fulfilled only if ControlPanel
works in collaboration with Sensor.
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
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
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 Sensor 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
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
Associations and Dependencies
In many instances, two analysis classes are related to one another in some fashion, much like
two data objects may be related to one another. In UML these relationships are called
associations
In many instances, a client-server relationship exists between two analysis classes. In such
cases, a client class depends on the server class in some way and a dependency relationship is
established.
Class-based modeling - Class-Responsibility-
Collaborator (CRC) Modeling
Analysis Packages