Soft Engg 2
Soft Engg 2
Soft Engg 2
UNIT – II
SOFTWARE REQUIREMENTS ANALYSIS & SPECIFICATION
WHAT IS SRS?
A software requirements specification (SRS) is a document that describes what the
software will do and how it will be expected to perform. It also describes the
functionality the product needs to fulfill the needs of all stakeholders (business, users).
● The SRS is developed based the agreement between customer and contractors. It
may include the use cases of how user is going to interact with software system.
Conceptual Integrity: Conceptual integrity in the SRS helps the reader to easily
understand it.
Traceable: Traceability means it can tell which code part related to which design
component, which test case related to which requirement and which design component
related to which requirement etc.
Verifiable: All requirements of the system should be verifiable. This means it should
be possible to tell whether or not the requirement has been met as specified in the
SRS. An SRS establishes the basis for agreement between the client and the supplier
on what the software product will do.
Section – I
Name of reviewer
Organization
Group Number
Date of review
Project title
2
Section – II
checklist for the SRS Document
Introduction
1. Is the purpose of the project clearly defined?
Ambiguity
Requirements?
Completeness
Consistency
Project?
3
REQUIREMENT PROCESS
The requirement process is the sequence of activities that need to be performed in the
requirements phase and that result in producing a high-quality document containing
the SRS.
The requirements process typically consists of three basic tasks:
problem or requirement analysis
requirements specification
requirements validation
Problem analysis
● Problem analysis is starts with a high-level “problem statement.” During analysis
the problem domain and the environment are modelled in an effort to understand the
system behaviour, constraints on the system, its inputs and outputs, etc.
● The basic purpose of this activity is to understanding of what the software needs to
provide. During analysis, the analyst will have a series of meetings with the clients
and end users.
● In the early meetings, the clients and end users will explain to the analyst about
their work, their environment, and their needs as they perceive them.
● In these early meetings, the analyst is basically the listener, absorbing the
information provided. Once the analyst understands the system to some extent, he
uses the next few meetings to seek clarifications of the parts he does not understand.
1) Feasibility study
● When the client go to the organization for getting the desired product developed, it
comes up with a rough idea about what all functions the software must perform and
which all features are expected from the software.
● Referencing to this information, the analysts do a detailed study about whether the
desired system and its functionality are feasible to develop.
4
● This feasibility study is focused towards goal of the organization. This study analyses
whether the software product can be practically materialized in terms of
implementation, contribution of project to organization, cost, and as per values and
objectives of the organization.
2) Requirement Gathering
● If the feasibility report is positive towards doing the project, next phase starts with
gathering requirements from the user.
● Analysts and engineers communicate with the client and end-users to know their
ideas on what the software should provide and which features they want the software
to include.
2. Completeness:
Completeness of SRS indicates completion of the numbering of all the pages, resolving
the to be determined parts covers all the functional and non-functional requirements
properly.
3. Consistency:
Requirements in SRS are needs to be consistent. If conflicts like logical conflicts like
time period of report generation, etc. then SRS in inconsistent.
4. Unambiguousness:
An SRS is needs to be unambiguous if all the requirements stated have only 1
interpretation. Some of the ways to prevent unambiguousness include the use of
modelling techniques like ER diagrams, proper reviews and individual checks, etc.
6
5. Ranking for importance and stability:
There should be classification the requirements as less or more important or more
specifically as desirable or essential. An identifier mark can be used with every
requirement to indicate its rank or stability.
6. Modifiability:
SRS should be made as modifiable as possible and should be capable of easily accepting
changes to the system. Modifications should be properly indexed and cross-referenced.
7. Verifiability:
An SRS is verifiable means able to checked, if there exists a specific technique to able
to be measure every requirement is met by the system.
8. Traceability:
Traceability means it can tell which code part related to which design component,
which test case related to which requirement and which design component related to
which requirement etc.
9. Testability:
An SRS should be written in such a way that it is easy to generate test cases and test
plans from the document.
7
● Another common form of error in requirements is inconsistency. Inconsistency can
be due to contradictions within the requirements themselves or to incompatibility of the
stated requirements with the actual requirements of the client.
● The third common requirement error is incorrect fact. Errors of this type occur when
some fact recorded in the SRS is not correct.
● The fourth common error type is ambiguity. Errors of this type occur when there are
some requirements that have multiple meanings, that is, their interpretation is not
unique.
COMPONENTS OF AN SRS
The important parts of the Software Requirements Specification (SRS) document is:
1) Functional requirements of the system.
2) Non-functional requirements of the system.
3) Performance Requirements
4) Goals of implementation.
1) Functional Requirements:
● The purposeful requirement’s part discusses the functionalities needed from the
system; Functional requirements are response time, speed, availability, recovery time of
various software.
● So, the system is used to perform a group of high- level functions.
● The functional view of the system is, each function of the system can be considered
as a transformation of a set of input data to the corresponding set of output is
knowledge.
2) Non-functional Requirements:
● Non-functional requirements needed to live the characteristics of the system which
may not be expressed as functions – like the maintainability of the system, movability
of the system, the usability of the system, etc.
Dynamic requirements
These typically include response time and constraints on the system. Response time is
the expected time for the completion of an operation.
4) Goals of Implementation:
● The goals of implementation part consisted some general suggestions relating to
development.
● The goals of the implementation section included document problems like revisions to
the system functionalities that will be needed within the future, new devices to be
supported within the future, reusability problems, etc. These are the things are also
need to implement if the developers not given the attention for to meet the requirements.
9
FUNCTIONAL SPECIFICATION WITH USE CASES
● It is a graphic demonstration of business needs, which describe how the end-user will
cooperate with the software or the application.
● The use cases provide us all the possible techniques of how the end-user uses the
application.
● Use cases specify the functionality of a system by specifying the behaviour of the
system, captured as interactions of the users with the system.
● The use case is functional testing and it is used to identify the test cases from the
beginning to the end of the system as per the usage of the system. By using this
technique, the test team creates a test scenario that can exercise the entire software
based on the functionality of each function from start to end.
10
d) Stakeholder: It refers to a person who interacts to find out the behaviour of the
system.
e) Precondition: It is the condition the system needs to be before the workflow starts.
f) Triggers: It is the event that initiates the use case.
g) Main success scenario: It is the scenario in which nothing fails, it’s also known as
basic flow.
h) Alternative paths: It is a different path compared to the main scenario.
i) Post condition: It is the condition which the system should have completed by the
end of the steps.
1) System:
A specific sequence of actions and interactions between actors and the system.
2) Use-case:
Use cases are used to represent high-level functionalities and how the user will handle
the system. It is denoted by an oval shape with the name of a use case written inside
the oval shape.
3) Actors:
An actor is anyone who performs an action using your system. Actors or users can be
a person, an organization, or an external system.
11
4) Relationships:
Some of the examples of the actors used in the case study of ‘University registration
system’.
Example: -1) case study of ‘University registration system’
A) Administrator
B) Student
C) Faculty
D) Data entry operator
12
The URS will allow the above actors to interact with the system with their specific
roles. Depending upon the role, an actor will be able to access only the defined
information from the system. We may define the role of every actor as:
A) Administrator: Able to add, modify or delete a programme, school, scheme, paper,
student, faculty and login information. Able to generate student registration card and
other reports.
B) Student: Able to add and modify his/her details and register for papers to be
studied in the current semester. Able to generate student registration card.
C) Faculty: Able to generate desired reports.
D) Data entry operator: Able to add, modify or delete student and faculty
information.
13
Creation of Use Case ‘University registration system’
Delete school
View school
Edit Programme
Delete programme
View programme
Edit scheme
Delete scheme
View scheme
Details
6. Generate Report Administrator, faculty Roll no wise
Program wise
Semester wise
Paper wise
14
Use Case Diagram depicting University Registration system
1) problem analysis
● The basic aim of problem analysis is to obtain a clear understanding of the needs of
the clients and the users, what exactly is desired from the software.
● The analysts have to ensure that the real needs of the clients and the users are
uncovered. The analysts are not just collecting and organizing information about the
client’s organization and its processes, but they also act as consultants who play an
active role of helping the clients and users identify their needs.
● The basic principle used in analysis is the same as in any complex task: divide and
conquer. That is, partition the problem into subproblems and then try to understand
each subproblem.
15
2) state and projection
● A state of a system represents some conditions about the system. when using state,
a system is first viewed as operating in one of the several possible states, and then a
detailed analysis is performed for each state. This is used in real-time software.
● In projection, a system is defined from multiple points of view. While using
projection, different viewpoints of the system are defined and the system is then
analysed from these different views.
16
Standard symbols for DFDs
Circle: A circle (bubble) shows a process that transforms data inputs into data
outputs.
Data Flow: A curved line shows the flow of data into or out of a process or data store.
Data Store: A set of parallel lines shows a place for the collection of data items. A data
store indicates that the data is stored which can be used at a later stage or by the other
processes in a different order.
Source or Sink: Source or Sink is an external entity and acts as a source of system
inputs or sink of system outputs.
17
Examples of DFD:
1) Data flow diagram of ATM.
18
1) 0-level DFD
● It is also known as fundamental system model, or context diagram represents the
entire software requirement as a single bubble with input and output data denoted by
incoming and outgoing arrows.
● Then the system is decomposed and described as a DFD with multiple bubbles. Parts
of the system represented by each of these bubbles are then decomposed and
documented as more and more detailed DFDs.
● This process may be repeated at as many levels as necessary until the program at
hand is well understood. It is essential to preserve the number of inputs and outputs
between levels, this concept is called levelling by DeMacro.
2) 1-level DFD
In 1-level DFD, a context diagram is decomposed into multiple bubbles/processes. In
this level, we highlight the main objectives of the system and breakdown the high-level
process of 0-level DFD into subprocesses.
19
3) 2-Level DFD
2-level DFD goes one process deeper into parts of 1-level DFD. It can be used to project
or record the specific/necessary detail about the system's functioning.
Purpose of ERD
● The database analyst gains a better understanding of the data to be contained in the
database through the step of constructing the ERD.
● The ERD is used to connect the logical structure of the database to users. In
particular, the ERD effectively communicates the logic of the database to users.
21
1. Entity
An entity can be a real-world object, either animate or inanimate, that can be merely
identifiable. An entity is denoted as a rectangle in an ER diagram. For example, in a
school database, students, teachers, classes, and courses offered can be treated as
entities.
Entity Set
An entity set is a collection of related types of entities. An entity set may include entities
with attribute sharing similar values. For example, a student set may contain all the
students of a school, a teacher set include all the teachers of a school from all faculties.
2. Attributes
Entities are denoted utilizing their properties, known as attributes. All attributes have
values. For example, a student entity may have name, class, and age as attributes.
For example, a student's name cannot be a numeric value. It has to be alphabetic. A
student's age cannot be negative, etc.
A) Key attribute:
Key attributes are those attributes that can uniquely identify the entity in the entity set.
Example: Roll-No is the key attribute because it can uniquely identify the student.
B) Composite attribute:
An attribute that can be split into components is a composite attribute.
Example: The address can be further split into house number, street number, city,
state, country, and pin code, the name can also be split into first name middle name,
and last name.
C) Single-valued attribute:
The attribute which takes up only a single value for each entity instance is a single-
valued attribute.
Example: The age of a student.
22
D) Multi-valued Attribute: If an attribute can have more than one value, it is known
as a multi-valued attribute. Multi-valued attributes are depicted by the double ellipse.
Example: a person can have more than one phone number, email-address, etc.
E) Derived attribute: Derived attributes are the attribute that does not exist in the
physical database, but their values are derived from other attributes present in the
database.
Example: age can be derived from date_of_birth. In the ER diagram, Derived attributes
are depicted by the dashed ellipse.
Relationships
The association among entities is known as relationship. Relationships are represented
by the diamond-shaped box. For example, an employee works_at a department, a
student enrolls in a course. Here, Works_at and Enrolls are called relationships.
Examples of ERD:-
23
REQUIREMENT VALIDATION
● Requirements validation is the process of checking that requirements actually define
the system that the customer really wants.
● Requirements validation is important because errors in a requirements document can
lead to extensive rework costs when these problems are discovered during development
or after the system is in service.
different types of checks of the requirements These checks include:
1. Validity checks A user may think that a system is needed to perform certain
functions. However, further thought and analysis may identify additional or different
functions that are required. Systems have diverse stakeholders with different needs and
any set of requirements is inevitably a compromise across the stakeholder community.
2. Consistency checks Requirements in the document should not conflict. That is,
there should not be different descriptions of the same system function.
24
REQUIREMENTS VALIDATION TECHNIQUES
1. Requirements reviews the requirements are analysed systematically by a team of
reviewers who check for errors and inconsistencies.
• Regular reviews should be held while the requirements definition is being formulated.
• Both client and contractor staff should be involved in reviews.
• Reviews may be formal or informal. Good communications between developers,
customers and users can resolve problems at an early stage.
• Dont underestimate the problems involved in requirements validation. Ultimately, it
is difficult to show that a set of requirements does in fact meet a user‘s needs.
Principal stages
• Problem analysis- Discuss requirements problem and propose change;
• Change analysis and costing- Assess effects of change on other requirements;
• Change implementation- Modify requirements document and other documents to
reflect change.
25