Chapter 4 SRS
Chapter 4 SRS
1
Requirements Analysis and Specification
2
3
Requirements Analysis and Specification
4
Requirements Analysis and Specification
5
Requirements Analysis and Specification
6
Requirements Analysis and Specification
7
Requirements Gathering
Analyst
gathers requirements
through:
observation of existing systems,
studying existing procedures,
discussion with the customer and
end-users,
analysis of what needs to be done,
etc.
8
Requirements Gathering (CONT.)
9
Requirements Gathering (CONT.)
10
Analysis of the Gathered Requirements
11
Inconsistent requirement
Some part of the requirement:
contradicts with some other part.
Example:
One customer says turn off heater and open water shower when
temperature > 100 C
Another customer says turn off heater and turn ON cooler when
temperature > 100 C
12
Incomplete requirement
13
Analysis of the Gathered Requirements
(CONT.)
14
15
Analysis of the Gathered Requirements(CONT.)
16
Analysis of the Gathered Requirements(CONT.)
After collecting all data regarding the system to be developed,
remove all inconsistencies and anomalies from the requirements,
systematically organize requirements into a Software Requirements
Specification (SRS) document .
17
18
Software Requirements Specification
22
Software Requirements Specification: A
Contract Document
24
SRS Document (CONT.)
25
SRS Document (CONT.)
27
Properties of a good SRS document
(cont...)
It should be traceable
you should be able to trace which part of the
specification corresponds to which part of
the design and code, etc and vice versa.
It should be verifiable
e.g. “system should be user friendly” is not verifiable
28
SRS Document (CONT.)
29
SRS Document (CONT.)
It is desirable to consider every system:
performing a set of functions {fi}.
Each function fi considered as:
transforming a set of input data to corresponding output data.
31
Functional Requirements
32
Functional Requirements
34
Nonfunctional Requirements
35
Constraints
Constraints describe things that the system should or should not do.
For example,
standards compliance
how fast the system can produce results
36
Examples of constraints
Hardware to be used,
Operating system
or DBMS to be used
Capabilities of I/O devices
Standards compliance
Data representations
by the interfaced system
37
Organization of the SRS Document
Introduction.
FunctionalRequirements
Nonfunctional Requirements
Externalinterface requirements
Performance requirements
Constraints
38
Example Functional Requirements
List all functional requirements
with proper numbering.
Req. 1:
Once the user selects the “search” option,
he is asked to enter the key words.
The system should output details of all books
whose title or author name matches any of the key words entered.
Details include: Title, Author Name, Publisher name, Year of Publication, ISBN Number,
Catalog Number, Location in the Library.
39
Example Functional Requirements
Req. 2:
When the “renew” option is selected,
the user is asked to enter his membership number and password.
After password validation,
the list of the books borrowed by him are displayed.
The user can renew any of the books:
by clicking in the corresponding renew box.
40
Req. 1:
R.1.1:
Input: “search” option,
Output: user prompted to enter the key words.
R1.2:
Input: key words
Output: Details of
all books whose title or author
name matches any of the key words.
Details include: Title, Author Name, Publisher name, Year
of Publication, ISBN Number, Catalog Number, Location in
the Library.
Processing: Search the book list for the keywords
41
Req. 2:
R2.1:
Input: “renew” option selected,
Output: user prompted to enter
his
membership number and password.
R2.2:
Input: membership number and password
Output:
listof the books borrowed by user are
displayed. User prompted to enter books to be
renewed or
user informed about bad password
Processing:Password validation, search
books issued to the user from borrower list
and display.
42
Req. 2:
R2.3:
Input: user choice for renewal of the books issued to him
through mouse clicks in the corresponding renew box.
Output: Confirmation of the books renewed
Processing: Renew the books selected by the in the
borrower list.
43
Examples of Bad SRS Documents
Unstructured Specifications:
Narrative essay --- one of the worst types of specification document:
Difficult to change,
difficult to be precise,
difficult to be unambiguous,
scope for contradictions, etc.
Forward References:
References to aspects of problem
defined only later on in the text.
44
Examples of Bad SRS Documents
Overspecification:
Addressing “how to” aspects
For example, “Library member names should
be stored in a sorted descending order”
Overspecification restricts the solution space
for the designer.
Contradictions:
Contradictions might arise
ifthe same thing described at several places in
different ways.
45
Summary
Requirements analysis and specification
an important phase of software development:
any error in this phase would affect all subsequent phases of development.
Consists of two different activities:
Requirements gathering and analysis
Requirements specification
46
Summary
The aims of requirements analysis:
Gather all user requirements
Clearly understand exact user requirements
Remove inconsistencies and incompleteness.
The goal of specification:
systematically organize requirements
document the requirements in an SRS
document.
47
Summary
Main components of SRS document:
functional requirements
Non functional requirements
constraints
48