Unit 2
Unit 2
Unit 2
SOFTWARE
REQUIREMENTS
ANALYSIS AND
SPECIFICATIONS
1. Requirements and Specification
Requirements describe:
planning
Software
tracking
document
ation
Requirements
coding
testing
3. Importance of Requirements
3.1 Any mistake at this phase leads to high cost
cost
14
12
10
8
cost
6
4
2
0
feasibilty requirement design coding testing
analysis
4. Types of Requirements
• Levels of Business
requirements
requirements
User System
requirements requirements
Specification
Document
Contd…Types of Requirements
Business Requirements :
- Top level requirements
- It focus on vision
User Requirement or High level requirements
- It derives from business requirements
- It defines the requirements by which the objective of business
will be achieved
- It describes the services that the system should provide and the
constrains under which it must operate. we don’t expect to see
any level of detail, or what exactly the system will do, It’s
more of generic requirements.
- It’s usually written in a natural language and supplied by
diagrams.
Contd..
System requirements
It mean a more detailed description of the system
services and the operational constrains such as how
the system will be used, and development constrains
such as the programming languages.
- This level of detail is needed by those who are
involved in the system development, like engineers,
system architects, testers, etc.
Difference between user and system requirements
Functional Requirements :
• It is same as user requirements only the difference is ,it defines
user’s view while functional requirements defines what
functionality is to be added in the software so that user
perform those activities
• It focus on system’s view(What system has to perform)
• It covers the main functions that should be provided by the
system.
• When expressed as user requirement, they are usually descried
in an abstract way. However more specific
functional system requirement describe the system functions,
it’s inputs, processing; how it’s going to react to a particular
input, and what’s the expected output.
Contd..
• The constrains, like how many process the system can handle
(performance), what are the (security) issues the system needs to
take care of such as SQL injections …
• The rate of failure (reliability), what are the languages and tools will
be used (development), what are the rules you need to follow to
ensure the system operates within the law of the organization
(legislative).
Examples of levels of requirements :
Functional Requirements :
• Find and highlight misspelled words.
• Display a dialog box with suggested
replacements.
• Making global replacements.
Contd..
Maintainability
Portability For developers
Testability
Contd..
Non functional Requirements are sensitive…
• Non-functional requirements are often critical than
individual functional requirements. Users can usually
find ways to work around a system function that doesn’t
really meet their needs. However, failing to meet a non-
functional requirement can mean that the whole system
is unusable.
• For example, if an aircraft doesn’t mean meet it’s
reliability requirements, it won’t be safe for operation,
or if an embedded control system fails to meet it’s
performance requirements, the control functions won’t
operate correctly.
Contd..
Non-functional requirements should be
measurable
Contd…4.1 Another type of requirements:-
--Known Requirements Functional
--Unknown Requirements
--Undreamt Requirements Non Functional
.
Contd..
Input to Requirement engineering – Problem
statement of an existing system along with broad
expectations from the new system.
Output from Requirement engineering- It produces one
large document, written in a natural language
contains the description of what the system will do
without describing how it will do
Without well written document
•-- Developers do not know what to build
•-- Customers do not know what to expect
•-- What to validate
Problem Statement
as input
Requirement SRS as a
Engineering output
Requirement Requirement
Development Management
1. Organizational Feasibility
2. Technical Feasibility
3. Economic Feasibility
4. Legal feasibility
Contd..
• Economic Feasibility
It focus on economic justification on new system
Legal feasibility : it focus on whether new
system may result in any infringement,
violation , contracts or liabilities
Contd..
1.Requirements Elicitation
Success of the
project
Contd..
• Interviews can be
1. open ended: There is no pre-set agenda.
Context free questions may be asked to
understand the problem and to have an
overview of situation .
Types of questions for result management systems :
group discussions
• Technical requirements.
• Documented
Steps
1. Identify stakeholders
2. List out requirements
3. Degree of importance to each requirement.
5 Points : V. Important
4 Points : Important
3 Points : Not Important but nice to have
2 Points : Not important
1 Points : Unrealistic, required further
Contd.
• Actor
• Use case
• Link
• System Boundary(Optional)
Contd.. 1. Actor
•An actor or external agent, lies outside the system model, but
interacts with it in some way.
•Notations used for Actor :
•A use case represents a user goal that can be achieved by accessing the
system or software application.
•It describes the sequence of interactions between actors and the
system necessary to deliver the services that satisfies the goal. it
also includes the possible variants of this sequence . i.e alternative
flow.
•A complete set of use cases specifies all the different ways to use the
system.
•Each use case has a description which describes the functionality that
will be built in the proposed system.
3. Link
• The base use case is incomplete without the included use case.
• The included use case is mandatory and not optional.
A large use case could have some behaviors which might be detached
into distinct smaller use cases to be included back into the base use case
using the UML include relationship. The purpose of this action is
modularization of behaviors, making them more manageable.
Example
• Include :
Contd… include
• Example 2:
5. Generalization of use case
2.Actors
List the actors that interact and participate in the
use cases.
3.Pre Conditions
Pre conditions that need to be satisfied for the use
case to perform.
4. Post Conditions
Define the different states in which we expect the system
to be in, after the use case executes.
5. Flow of events
1. Basic Flow
List the primary events that will occur when this use case is executed.
2. Alternative Flows
Any Subsidiary events that can occur in the use case should be
separately listed. List each such event as an alternative flow.
A use case can have many alternative flows as required.
6.Special Requirements
Business rules should be listed for basic & information flows as special
requirements in the use case narration .These rules will also be used for writing
test cases. Both success and failures scenarios should be described.
7. Related use cases
76
Refer Example 6
Similarly make template for remaining use cases ….refer k k aggarawal chapter 3
Use cases should not be used to capture all the details of the system.
Only significant aspects of the required functionality
No design issues
Use Cases are for “what” the system is , not “how” the system will be designed
free of design characteristics
6. Delphi Technique
The Delphi technique involves circulating questionnaires on a
specific problem among group members, sharing the questionnaire
results with them, and then continuing to re circulate and refine
individual responses until a consensus regarding the problem is
reached.
In contrast to the brainstorming, the Delphi technique does not
have group members meet face to face. The formal steps followed in
the Delphi Technique are:
STEP 1: A problem is identified.
STEP 2: Group members are asked to offer solutions to the problem by
providing anonymous responses to a carefully designed questionnaires.
STEP 3: Responses of all group members are compiled and sent out to
all group members.
STEP 4: Individual group members are asked to generate a new
individual solution to the problem after they have studied the individual
responses of all other group members.
STEP 5: Step 3 and 4 are repeated until a consensus problem solutions
is reached.
Contd………Delphi Technique
85
Step 1. Draw the Context Diagram(0 Level DFD)
• This is also called as Fundamental System Model or Level-0 DFD.
• It shows :
- data input to the system
- output data generated by the system
- external entities.
For example: if bubble A has two inputs x1 and x2, and one output y that
represents A should have exactly two external inputs and one external output
.
Context Diagram of Result Mgmt System
Step 2. Development of prototype(optional)
b) Data Dictionaries
c) ER Diagrams
89
a) Data Flow Diagrams(DFDS)
.
contd….Standard Symbols for DFD’s
Levelling :
---The number of levels can be increased until every process represents basic
functionality or problem at hand is well understood
Designing Data Flow
Diagrams(DFDS)
93
Level 1 and level 2 DFDs
Level 1: DFD depicts basic modules in the system and flow of data among various
modules. Level 1 DFD also mentions basic processes and sources of information.
Level 2 - At this level, DFD shows how data flows inside the modules mentioned in
Level 1.
Higher level DFDs can be transformed into more specific lower level DFDs with
deeper level of understanding unless the desired level of specification is achieved.
94
DFD for Result management Sytem
95
b) Data Dictionaries
It stores meaning and origin of data, its relationship with other data, data format for
usage etc.
It Includes :
Meaning Notation
= Composed of
{} Repetition
() Optional
+ And
[/] Or
97
Contd..Data dictionaries
Example :
98
c) ER Diagram
99
Basic elements in ER model
10
0
Symbols used in E-R Diagram
Entity – rectangle
Attribute -oval
Relationship – diamond
Link - line
10
1
ER Model
Entity
Entities are represented by means of rectangles. Rectangles are named with the entity set
they represent.
Attributes
Attributes are properties of entities. Attributes are represented by means of eclipses. Every
eclipse represents one attribute and is directly connected to its entity (rectangle).
10
2
ER Model
Relationship
10
3
Types of Attributes
1. Simple attribute
2. Composite attribute
3. Derived attribute
4. Stored attribute
5. Single valued attribute
6. Multi valued attribute
10
4
Types of Attributes
• Composite attribute:
10
5
Types of attributes
•Derived attribute:
Attribute values are derived from another attribute.
Denoted by dotted oval
Ex - Age
Stored attribute:
10
6
Types of attributes
Single-valued attribute:
For example : a person can have only one ‘date of birth’, ‘age’ ,
Social_Security_Number.etc.
That is a single valued attributes can have only single value. But it can be
simple or composite attribute.
10
7
Types of attributes
Multi-value attribute:
Attribute may contain more than one values. Denoted by double circled oval
line connecting to the entity in the ER diagram.
Ex: Phone-number, College-degree, email addresses etc
10
8
KEYS
1. Candidate Key
2. Composite Key
3. Primary key
4. Foreign Key
10
9
Graphical Representation in E-R diagram
11
0
Degree of a relationship
May
Student course
have
Teacher
11
1
Cardinality constraints
If we have two entity types A and B, the cardinality constraint specifies the
number of instances of entity B that can (or must) be associated with entity A.
11
2
Cardinality constraints
11
3
Cardinality constraints
one-to-one
11
4
Cardinality constraints
one to many
WORKS-
EMPLOYEE DEPARTMENT
FOR
1 M
11
5
Cardinality constraints
many-to-one
WORKS-
EMPLOYEE DEPARTMENT
FOR
11
6
Cardinality constraints
many-to-many
WORKS-
EMPLOYEE PROJECT
ON
M N
11
7
Step 4 : Finalise the requirements :Finalise the
analyzed requirements and proceed for next step i.e
Documentation
3. Requirements Documentation
Project requirements
– cost, delivery schedules, staffing, reporting
procedures
Design solutions
– partitioning of SW into modules, choosing data
structures
Product assurance plans
– Quality Assurance procedures, Configuration
Management procedures, Verification &
Validation procedures
Contd..
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definitions, Acronyms and Abbreviations
1.4 References
1.5 Overview
SRS - Introduction Section
• Purpose
– delineate the purpose of the particular SRS
– specify the intended audience for the SRS
• Scope
– identify the Software products to be produced by name
– explain what the Software product will do, and if necessary,
what it will not do
– describe the application of the Software being specified. i.e.
benefits, objectives, goals as precisely as possible
• Overview
– describe what the rest of the SRS contains
– how the SRS is organized
Contd…SRS Prototype Outline
2. General description
2.1 Product perspective
2.2 Product function summary
2.3 User characteristics
2.4 General constraints
2.5 Assumptions and dependencies
Product Perspective
User Characteristics
• Describe the general characteristics of the eventual
users of the product. (such as educational level,
experience and technical expertise )
General Constraints
• Regulatory policies
• Hardware limitations
• Interfaces to other applications
• Parallel operation
• Audit functions
• Control functions
• Criticality of the application
• Safety and security considerations
Contd…SRS Prototype Outline
3. Specific Requirements
- Functional requirements
- External interface requirements
- Performance requirements
- Design constraints
- Attributes eg. security, availability, maintainability
- Other requirements
Appendices
Index
Functional Requirements
• Introduction
– describe purpose of the function and the
approaches and techniques employed
• Inputs and Outputs
– sources of inputs and destination of outputs
– quantities, units of measure, ranges of valid
inputs and outputs
– timing
Contd..Functional Requirements
• Processing
– validation of input data
– exact sequence of operations
– responses to abnormal situations
– any methods (eg. equations, algorithms) to be used
to transform inputs to outputs
External Interface Requirements
• User interfaces
• Hardware interfaces
• Software interfaces
• Communications interfaces
• Other requirements
– database: frequency of use, accessing capabilities,
static and dynamic organization, retention
requirements for data
– operations: periods of interactive and unattended
operations, backup, recovery operations
– site adaptation requirements
Appendices
SRS should be
1. Correct
2. Unambiguous
3. Complete
4. Consistent
5. Ranked for importance and/or stability
6. Verifiable
7. Modifiable
8. Traceable
Contd..
• Correct : The SRS is correct if and only if, every requirement stated therein is
one that the software shall meet.
• Unambiguous: every requirement has only interpretation.
• Complete : SRS is complete if and only if it includes all significant
requirements relating to functionality , performance, design, constraints,
attributes or external interfaces.
• Consistency : SRS is consistent if and only if, no requirements are in
conflicting situation.
Consistency is achieved by :
Use of standards terms or definitions
Use of data dictionary
• Ranked for importance or stability : SRS is ranked for importance and/or
stability if each requirement in it has an identifier to indicate either the
importance or stability of that particular requirement.
• Verifiability : A requirement is verifiable if and only if there exists some
finite cost effective process with which a person or machine can check that
the SW meets the requirement.
Contd..
• Modifiable
An SRS is modifiable, if and only if, its structure and style are such
that any changes to the requirements can be made easily,
completely, and consistently while retaining structure and style..
• Traceable
An SRS is traceable, if the origin of each of the requirements is clear
and if it facilitates the referencing of each requirement in future
development or enhancement documentation.
Backward traceability : This depends upon each requirement
explicitly referencing its source in earlier documents.
Forward traceability : This depends upon each requirement in the
SRS having a unique name or reference number
Examples of Requirements statements
• The data set will contain an end of file Ambiguous
character.
• The product should have a good human Non-verifiable
interface.
• The program shall never enter an infinite Non-verifiable
loop.
• The output of the program shall usually Non-verifiable
be given within 10 secs.
• The output of a program shall be given Verifiable
within 20secs of event X 60% of the time.
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.
• Noise:
– Presence of text containing information irrelevant to the
problem.
• Silence:
– aspects important to proper solution of the problem are
omitted.
Contd..Examples of Bad SRS Documents
• Overspecification:
– Addressing “how to” aspects
– For example, “Library member names should be stored in a
sorted descending order”
– Over specification restricts the solution space for the
designer.
• Contradictions:
– Contradictions might arise
• if the same thing described at several places in different
ways.
Contd..Examples of Bad SRS Documents
• Ambiguity:
– Literary expressions
– Unquantifiable aspects, e.g. “good user interface”
• Wishful Thinking:
– Descriptions of aspects
• for which realistic solutions will be hard to find.
Advantages of a SRS
• It will be very difficult for user document writers to write the users’
manuals properly without understanding the SRS document.
For complex logic we have :
• Decision table
Decision table
• Easy to use
• Easier to modify in comparison to flowcharts.
• Communication is easier between manager and
analysts
• Decision rules are clearly understood
• Facilitate more compact documentation
• Documentation is easily prepared, changed or
updated
Dis-advantages
Organize
review
meeting
Follow
Revise SRS
up
document
actions
Contd..
• Plan review : The review team is selected and time and place
for review meeting is fixed.
• Distribute SRS document : SRS document is distributed to
all the members.
• Read SRS document : Each member should read the
document carefully to find conflicts, omissions,
inconsistencies, etc
• Organize review meeting : each member presents his/her
views and identified problems . The problems are discussed
and a set of actions to address the problem is approved.
• Follow up actions : The chairperson of the team checks that
the approved actions have been carried out.
• Revise SRS : The SRS document is revised to reflect the
approved actions. At this stage , it may be accepted or may
reviewed.
Contd..
• Requirements clarification
• Unrealistic requirements
• Security issues
Contd..
It involves :
1. Requirement evolution
2. Requirement Management plan
3. Requirement change Management
Contd..
1. Evolution of requirements
• Induction to new requirements can happen during requirement engineering process
or after system installation
Example : Adhering to Vasthu system for house .
Contd..
Revised
Requirements
Contd.
Management of changes
Documenting Requirement s
Requirements traceability
Communications of change
Establishment of baselines
Contd..
5. Communication of change
Contd..
So what is Quality????
1
6
6
Software Quality is :
Product qualities :
describes attributes of software process
-It focuses on :
Eg: Reliability
Process Quality :
describes attributes of software development process itself
-It focuses on
Eg: productivity of tool
Difference between QC and QA
Quality control(QC) Quality assurance(QA)
QC is a set of activities for ensuring quality in QA is a set of activities for ensuring quality in
products. The activities focus on identifying the processes by which quality products are
defects in the actual products produced. developed.
QC makes sure the results of what you’ve done QA makes sure you are doing the right things.
are what you expected.
Testing team is responsible for QC. All team members are responsible for QA.
QC activities monitor and verify that the project Quality assurance activities monitor and verify
deliverables meet the defined quality standards. that the processes used to manage and create the
deliverables have been followed and are
operative.
Are we building the product right? Are we building the right product?
Verifications take place first and Validation occurs after verification and
include the checking for mainly involves the checking of the
documentation, code etc overall product.
Done by developers Done by testers
1
7
2
SQA(Software Quality Assurance)
This task of SQA emphasizes the need for process adherence during product
development.
--In addition, the development process should also adhere to
procedures defined for product development.
---There fore , this is a combination of two tasks, product evaluation and
process monitoring
Contd..
Product evaluation
It ensures that the standards laid down for a project are followed.
During product evaluation, the compliance of the software product to the exist
ing standards is verified.
Initially, SQA activities are conducted to monitor the standards and
procedures of the project.
Product evaluation ensures that the software product reflects the identified
requirements identified in the project management plan
Contd..
Process monitoring
It ensures that appropriate steps to follow the product
development procedures are carried out.
SQA monitors processes by comparing the actual steps carried out with the steps in the
documented procedures.
Product evaluation and process monitoring ensure that the development and
control processes described in the project management plan are correctly carried out
These tasks ensure that the project-re1ated procedures and standards are
followed. They also ensure that products and processes conform to standards and
procedures performed
Contd..
Controlling Change:
• Purpose
• Management
• Documentation
• Standards and practices
• Reviews and audits
• Test
• Problems reporting and corrective actions
• Tools ,techniques and methodologies
• Tools and methods/ standards used
• SCM
• Training
• Risk management
Contd..
• Purpose and scope : indicates those software process activities that are
covered by quality assurance
• Management : this section describes SQA tasks and activities and their
placement throughout the software process and organizational roles and
responsibilities relative to software quality.
• Documentation : each of the work products produced as a part of software
process Are documented
These include:
Project document(project plan, ERD , technical
documents(test plans), user document(help files)
Standards and practices: this section lists all applicable standards and
practices that are applied during software process
Contd..
• ISO 9000
• CMM
ISO 9000(International organization for standardization)
“ISO” in greek means “equal”, so the association wanted to
convey the idea of equality
• The ISO 9000 standard:
• It is a set of quality standards determined by the International
Organization for Standardization to assure that businesses meet a high
level of quality with products, services, organizational processes and
ethics
– specifies guidelines for maintaining a quality system.
– It describes quality assurance elements in generic terms that can be
applied to any business regardless of the products or services offered.
.
Contd..
ISO 9000 standard is written for a wide range of industries whereas CMM
framework is specifies for the software industry.
CMM is a five level framework for measuring software engineering practices, and
ISO 9000 defines a minimum level of attributes for a quality management program.
The ISO 9000’s concept is to follow a set of standards to make success repeatable.
The CMM emphasizes a process of continuous improvement.