SE Module 2
SE Module 2
Understanding
Requirements
Software Engineering
Understand Requirements
Understanding the requirements of a problem is among the most difficult
tasks that face a software engineer.
Shouldn’t the end users have a good understanding of the features and
functions that will provide benefit?
Elicitation.
It certainly seems simple enough(objectives, accomplished, product fits and fi-
nally, product is to be used.
• Problems of scope (customers specify unnecessary technical detail that may confuse)
Elaboration is driven by the creation and refinement of user scenarios that de-
scribe how the end user (and other actors) will interact with the system
Negotiation.
It isn’t unusual for customers and users to ask for more than can be achieved,
given limited business resources.
Validation.
Requirements validation examines the specification to ensure Correctness
Requirements management.
Requirements for computer-based systems change
Help the project team to identify, control, and track requirements and changes
to requirements at any time as the project proceeds
ESTABLISHING THE GROUNDWORK
1) Identifying Stakeholders
“anyone who benefits in a direct or indirect way from the system which is being
developed.”
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?
The final set of questions focuses on the effectiveness of the communication activity
itself:
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
Meetings are conducted and attended by both software engineers and other
stakeholders.
An agenda is suggested that is formal enough to cover all important points but
informal enough to encourage the free flow of ideas.
Normal requirements. The objectives and goals that are stated for a product or
system during meetings with the customer
Often called use cases, provide a description of how the system will be used.
4) Elicitation Work Products – Product produced as a consequence of
elicitation will vary depending on the size of the product to be built.
Once actors have been identified, use cases can be developed. Jacobson
suggests 10 questions that should be answered by a use case:
1) Who is the primary actor, the secondary actor(s)?
2) What are the actor’s goals?
3) What preconditions should exist before the story begins?
4) What main tasks or functions are performed by the actor?
5) What exceptions might be considered as the story is described?
6) What variations in the actor’s interaction are possible?
7) What system information will the actor acquire, produce, or change?
8) Will the actor have to inform the system about changes in the external environment?
9) What information does the actor desire from the system?
10)Does the actor wish to be informed about unexpected changes?
USE CASE: CASE STUDY ON “SAFEHOME”
1) Homeowner (a user),
1. The homeowner observes the SafeHome control panel to determine if the system is
ready for input. If the system is not ready, a not ready message is displayed on the LCD
display, and the homeowner must physically close windows or doors so that the not
ready message disappears. [A not ready message implies that a sensor is open; i.e.,
that a door or window is open.]
2. 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 incor-
rect, the control panel will beep once and reset itself for additional input. If the
password is correct, the control panel awaits further action.
3. The homeowner selects and keys in stay or away to activate the system. Stay activates
only perimeter sensors (inside motion detecting sensors are deactivated). Away
activates all sensors.
4. When activation occurs, a red alarm light can be observed by the homeowner.
Uses cases are further elaborated to provide considerably more detail about the
interaction.
For example, Cockburn suggests the following template for detailed
descriptions of use cases:
Scenario:
1. Homeowner: observes control panel
2. Homeowner: enters password
3. Homeowner: selects “stay” or “away”
4. Homeowner: observes read alarm light to indicate that SafeHome has been armed
Exceptions:
1) Control panel is not ready: homeowner checks all sensors to determine which are
open; closes them.
2) Password is incorrect: homeowner reenters correct password.
3) Password not recognized: monitoring and response subsystem must be contacted to
reprogram password.
4) Stay is selected: control panel beeps twice and a stay light is lit; perimeter sensors are
activated.
5) Away is selected: control panel beeps three times and an away light is lit; all sensors
are activated.
Priority: Essential, must be implemented
When available: First increment
Frequency of use: Many times per day
Channel to actor: Via control panel interface
Secondary actors: Support technician, sensors
Channels to secondary actors:
Support technician: phone line
Sensors: hardwired and radio frequency interfaces
Open issues:
1) Should there be a way to activate the system without the use of a password or with
anabbreviated password?
2) Should the control panel display additional text messages?
3) How much time does the homeowner have to enter the password from the time the
first key is pressed?
4) Is there a way to deactivate the system before it actually activates?
UML Use Case diagram
for
“SafeHome”
Home Security
Function
BUILDING THE REQUIREMENTS MODEL
The model changes dynamically as you learn more about the system to be built, and
other stakeholders understand more about what they really require.
1) Elements of the Requirements Model
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.
Behavioral elements: the requirements model must provide modeling
elements that depict behavior
1) Analysis patterns speed up the development of abstract analysis models with main
requirements and also reusable analysis models.
2) Analysis patterns facilitate the transformation of the analysis model into a design
model by suggesting design patterns and reliable solutions.
Problem Statement for Students
Title: Ensuring timely Parcel delivery and collecting customer’s feedback for the
offered services in tamperproof manner
Description: Currently, postman delivers a parcel and takes signature from customer
in paper format. No live/online feedback mechanism is available to check customer’s
satisfaction. Also, chances are that postmen can tamper with the feedback to
suit their requirements. We wish to have a foolproof system which will enable user
to collect customer’s feedback without allowing postman to tamper with the
feedback
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
Rather than a single customer communication activity, the following activities are
defined:
Is each requirement consistent with the overall objectives for the system/product?
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 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 all patterns been properly validated? Are all patterns consistent with customer
requirements?
Requirements Modeling:
Scenarios, Information,
and Analysis Classes
REQUIREMENTS ANALYSIS
Requirements analysis results in the specification of software’s operational characteristics
The requirements modeling action results in one or more of the following types
of models:
The model should focus on requirements that are visible within the problem
These are the questions that must be answered if use cases are to provide
value as a requirements modeling tool.
2) Refining a Preliminary Use Case
A description of alternative interactions is essential for a complete understanding
of the function that is being described by a use case.
Each step in the primary scenario is evaluated by asking the following questions:
Is it possible that the actor will encounter some error condition at this point?
Is it possible that the actor will encounter some other behavior at this point
3) Writing a Formal Use Case
Use Case Template can be included (It may vary depend on Problem statement):
1) Iteration
2) Primary actor
3) Goal in context
4) Preconditions
5) Trigger
6) Scenario
7) Exceptions
8) Priority
9) When available
10)Frequency of use
11)Channel to actor
12)Secondary actors
13)Channels to secondary actors
14)Open issues
UML MODELS THAT SUPPLEMENT
THE USE CASE
1) Developing an
Activity Diagram
The UML activity diagram
supplements the use case
by providing a graphical
representation of
the flow of interaction
within a specific sce-
nario.
2) Swimlane Diagrams
The operations that will be applied to the objects to effect the manipulation, relation-
ships between the objects, and the collaborations that occur between the classes that
are defined.
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.
(4) Operations that monitor an object for the occurrence of a controlling event.
4) Class-Responsibility-Collaborator (CRC)
Modeling
CRC modeling provides a simple means for identifying and organizing the classes
that are relevant to system or product requirements.
A CRC model is really a collection of standard index cards that represent classes. The
cards are divided into three sections.
(1) Along the top of the card you write the name of the class.
(2) In the body of the card you list the class responsibilities on the left and
(3) the collaborators on the right.
Responsibilities. Basic guidelines for identifying responsibilities
(attributes and operations)
1) System intelligence should be distributed across classes to best address the needs of
the problem.
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.
(1) A class can use its own operations to manipulate its own attributes, thereby
fulfilling a particular responsibility, or
In such cases, a client class depends on the server class in some way and a
dependency relationship is established.
Multiplicity Dependencies
6) Analysis Packages
An important part of analysis modeling is categorization.
That is, various elements of the analysis model are categorized in a manner
that packages them as a grouping—called an analysis package—that is given a
representative name.
End of Module 2