Unit - 2: Software Requirements Analysis and Specifications
Unit - 2: Software Requirements Analysis and Specifications
SOFTWARE
REQUIREMENTS
ANALYSIS AND
SPECIFICATIONS
1
Lecture 9
-- What to validate
REQUIREMENTS ENGINEERING
PROCESS
(Review)
Requirement Engineering
-- State of practice
EXAMPLE:
8
Requirement Engineering
EXAMPLE:
SOLUTION:
1.Issue of books
2.Return of books
3.Query processing 9
Types of Requirements
◻ There are various categories of the requirements.
◻ On the basis of their priority, the requirements are classified into
the following three types-
Known requirements: Those that should be absolutely met.
Unknown requirements: Those that are highly desirable but not
necessary.
Undreamt requirements: Those that are possible but could be
eliminated.
◻ On the basis of their functionality the requirements are classified
into the following two types:-
◻ Functional and Non functional
◻ User and system requirement
Types of
Requirements
Types of Requirements
Requirements
Functional Non-Functional
7
Types of
Requirements
Functional requirements describe what the software has to
do. They are often called product features.
Non Functional requirements are mostly quality
requirements. That stipulate how well the software does,
what it has to do.
Availability
Reliability
For Users
Usability
Flexibility
Maintainability
Portability For Developers
Testability
Types of
Requirements
User and system requirements
• User requirement are written for the users and include
functional and non functional requirement.
• System requirement are derived from user requirement.
• The user and system requirements are the parts of software
requirement and specification (SRS) document.
9
Types of
Requirements
Interface Specification
• Important for the customers.
TYPES OF
INTERFACES
10
Feasibility
Study
A Feasibility Study is a study made before committing to a
project. It leads to a decision:
• go ahead
• do not go ahead
• think again
1.Operation Feasibility
2.Technical Feasibility
3.Economic Feasibility
12
Feasibility study can be divided into following:
1. Economic feasibility
2. Legal feasibility/operational
3. Organizational feasibility (man power resources and work culture of
organization)
4. Technical feasibility
5. Schedule feasibility
13
Requirements Elicitation
Perhaps
• Most difficult
•Most critical
•Most error prone
• Most communication intensive Succeed
effective customer developer partnership Selection of any
method
1.It is the only method that we know
2.It is our favorite method for all situations
3.We understand intuitively that the method is effective in the
present circumstances.
Normally we rely on first two reasons.
18
Requirements Elicitation
1.Interviews
2.Brainstorming Sessions
3.FAST
19
1. Interviews
Both parties have a common goal
Success of the
project
proposed software.
2. Brainstorming Sessions
It is a group technique
group discussions
Groups
1. Users 2. Middle Level managers 3. Total Stakeholders
22
2. Brainstorming Sessions
A Facilitator may handle groupbias, conflicts carefully.
23
3. Facilitated Application
specification Techniques (FAST)
Objective is to bridge the expectation gap.
24
3. Facilitated Application
specification Techniques (FAST)
Guidelines
25
3. Facilitated Application
specification Techniques (FAST)
FAST session Preparations
26
3. Facilitated Application specification
Techniques (FAST)
27
4. Quality Function Deployment
Technical requirements.
Documented
-- Normal requirements
-- Expected requirements
-- Exciting requirements
28
Requirements Elicitation
Steps
1. Identify stakeholders
2. List out requirements
3. Degree of importance to each
requirement.
29
Requirements Elicitation
5 Points: V. Important
4 Points : Important
3 Points : Not Important but nice to have
2 Points: Not important
1 Points: Unrealistic, required further
exploration
Requirement Engineer may categorize like:
(i) It is possible to achieve
(ii) It should be deferred & Why
(iii It is impossible and should be dropped
) from consideration
First Category requirements will be implemented as
per priority assigned with every requirement.
30
5. The Use Case Approach
Use Cases
A use case is initiated by a user with a particular goal
in mind, and completes successfully when
that goal is satisfied.
33
* It describes the sequence of interactions between
actors and the system necessary to deliver the
services that satisfies the goal.
* Alternate sequence
* System is treated as black box.
Thus
Use Case captures who (actor) does what (interaction)
with the system, for what purpose (goal), without dealing
with system internals.
34
*defines all behavior required of the system,
bounding the scope of the system.
Jacobson & others proposed a template for writing
Use cases as shown below:
1. Introduction
Describe a quick background of the 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.
35
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. Use Case relationships
*Use Cases are for “what” the system is , not “how” the
system will be designed
39
Use case diagram for Result Management System
Maintain
Student
Details
Maintain
Subject
Details
Data Entry
Operator Maintain
Result
Details
Login
Administrator/D
R Generate
Result
Reports
View Results
Student/Teacher
40
1. Maintain student Details
Add/Modify/update students details like name, address.
2. Maintain subject Details
Add/Modify/Update Subject information semester wise 3.Maintain
Result Details
6. View Result
(i) According to course code
(ii) According to Enrollment number/roll number
41
REQUIREMENT ANALYSIS
42
Draw the Context Diagram
43
Context Diagram of Result Mgmt System
44
Model the Requirements
This process usually consists of various graphical representations of the
functions, data entities, external entities and the relationships between
them.
This graphical view may help to find incorrect, inconsistent, and missing
requirements.
• Data Dictionaries
• ER Diagrams
45
Data Flow Diagrams
DFD show the flow of data through the system.
46
Standard Symbols for DFD’s
Symbol Name Function
48
DFD for UNIVERSITY COURSE REGISTRATION SYSTEM
49
Data Dictionaries
Data Dictionaries are simply repositories to store information
about all data items defines in DFD.
sequence:
+ A plus sign indicates one element is followed by or concatenated with
another element.
repetition:
[ ] Square brackets are used to enclose one or more optional elements.
| A vertical line stands for "or" and is used to indicate alternatives.
selection:
{} Curly braces indicate that the element being defined is made up of a series
of repetitions of the element(s) enclosed in the brackets.
repetition:
Completed-order = [ item-ordered ]
* A complete customer order *
selection:
performances-attended = counter
* Performances-attended is the number of performances this customer has
attended.*
55
Entity – Relationship
Model
(ER model)
56
Introduction
57
Basic elements in ER model
58
Symbols used in E-R Diagram
Entity – rectangle
Attribute -oval
Relationship – diamond
Link - line
59
ER Model
Entity
Entities are represented by means of rectangles. Rectangles are named with the
entity set they represent.
60
ER Model
Relationship
61
TYPES OF ATTRIBUTES
1. Simple attribute
2.Composite attribute
3.Derived attribute
4.Stored attribute
5.Single valued attribute
6.Multi valued attribute
62
TYPES OF ATTRIBUTES
63
TYPES OF ATTRIBUTES
•Composite attribute:
64
TYPES OF ATTRIBUTES
•Derived attribute:
65
TYPES OF ATTRIBUTES
Stored attribute:
66
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.
67
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
68
KEYS
1.Candidate Key
2.Composite Key
3.Primary key
4.Foreign Key
69
CANDIDATE KEY
70
COMPOSITE KEY
71
PRIMARY KEY
72
FOREIGN KEY
•Both foreign and primary keys must be of the same data type
73
Graphical Representation in E-R diagram
74
DEGREE OF A RELATIONSHIP
CUSTOMER
75
CARDINALITY CONSTRAINTS
76
CARDINALITY CONSTRAINTS
one-to-one
77
CARDINALITY CONSTRAINTS
one to many
WORKS-FO
EMPLOYEE DEPARTMENT
R
1 M
78
CARDINALITY CONSTRAINTS
many-to-one
WORKS-FO
EMPLOYEE DEPARTMENT
R
79
CARDINALITY CONSTRAINTS
many-to-many
WORKS-O
EMPLOYEE PROJECT
N
M N
80
PARITICIPATION CONSTRAINTS
(OPTIONALITY)
WORKS-FO
EMPLOYEE DEPARTMENT
R
N 1
For example, attributes of a person like name, age, and gender can
be inherited by lower level entities like student and teacher etc.
Benefits of ER diagrams
Second, ER diagrams are readily translatable into relational tables which can
be used to quickly build databases. In addition, ER diagrams can directly be
used by database developers as the blueprint for implementing data in
specific software applications.
• Bus - Company owns busses and will hold information about them.
• Route - Buses travel on routes and will need described.
• Town - Buses pass through towns and need to know about them
• Driver - Company employs drivers, personnel will hold their data.
• Stage - Routes are made up of stages
• Garage - Garage houses buses, and need to know where they are.
RELATIONSHIPS
1.New member
2.Renewal
3.Cancel membership
Decision: When the 'new member' option is selected, the software asks
details about the member like member's name, address, phone number etc.
Action: If proper information is entered, then a membership record for the
member is created and a bill is printed for the annual membership charge plus
the security deposit payable.
Example Contd..
Renewal option
Decision: If the 'renewal' option is chosen, the LMS asks for the member's
name and his membership number to check whether he is a valid member or
not.
Action: If the membership is valid then membership expiry date is updated
and the annual membership bill is printed, otherwise an error message is
displayed.
STRUCTURE
written by customer
written by developer
The basic issues that the SRS writer(s) shall address are the
following:
a)Functionality
b)External Interfaces
c)Performance
d)Attributes
e)Design Constraints imposed on an implementation.
SRS Should
-- Correctly define all requirements
-- not describe any design details
-- not impose any additional constraints
Characteristics of a good SRS
SRS should be
1.Correct
2.Unambiguous
3.Complete
4.Consistent
5.Ranked for importance and/or stability
6.Verifiable
7.Modifiable
8.Traceable
Advantages of a SRS
• It will be very difficult for user document writers to write the users’
manuals properly without understanding the SRS document.
Organization of the SRS
IEEE has published guidelines and standards to organize an SRS.
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definition, Acronyms and abbreviations
1.4 References
1.5 Overview
1.Requirements Reviews
2.Prototyping
REQUIREMENTS REVIEWS
REQUIREMENTS VALIDATION
Problem actions
• Requirements clarification
• Unrealistic requirements
• Security issues
REVIEW CHECKLISTS
Understandability
Redundancy
Completeness
Ambiguity
Consistency
Organization
Conformance to standards
Traceability
Requirement Management
• Very critical.
•Assignment of responsibilities
• Management of changes
• Documentation
•Requirements traceability
• Communication of change
• Establishment of baseline
SOFTWARE QUALITY
ASSURANCE
Software Quality
•Conformance to requirements
•Fitness for the purpose
•Level of satisfaction
1
2
9
When user uses the product, and finds the product fit for its
Software Quality Assurance
1
3
0
Software Quality Assurance
Are we building the product right? Are we building the right product?
Ensure that the software system meets Ensure that the functionalities meet
all the functionality the intended behavior.
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.Software Inspection
2.System testing
The testing can be carried out using following tests:-
i. Unit testing
ii. Module testing
iii. System testing
iv. Acceptance testing 1
3
4
SQA Plans
The SQA Plan provides a road map for instituting software quality
assurance. Developed by the SQA group, the plan serves as a
template for SQA activities that are instituted for each software
project.
1.ISO 9000
1. Application
2. Pre-assessment
3. Document review and adequacy of audit
4. Compliance audit
5. Registration
6. Continued surveillance
ISO 9000 Series
The types of software industries to which the different ISO
standards apply are as follows:
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.