Software Requirement Analysis &it's Needs
Software Requirement Analysis &it's Needs
Software Requirement Analysis &it's Needs
PKD
Syllabus:Module : 2: REQUIREMENT ANALYSIS AND DESIGN
1. Describe software Requirement analysis and its needs 2. Describe
Requirement specification 3. Describe the desirable characteristics of an
SRS 4. Explain structure of an SRS document 5. Explain data flow
diagram 6. Explain the role of Software Architecture 7. Describe how to
plan for a software project 8. Define software Design 9. Describe software
design concepts. 10. Explain function oriented design and its complexity
metrics. 11. Explain object oriented design and its complexity metrics 12.
Describe detailed design
2
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Test engineers:
To ensure that requirement is understandable from functionality point of view, so that
they test the software and validate it’s working.
User Documentation writers
Ensure that they understand the features of the product well enough to beable to write
user’s manual.
Project Engineers
Ensure that they can estimate the cost of the project easily by referring to the SRS
document and that it contains all the required information to plan the project.
Maintenance Engineers
SRS document helps to understand the functionalities of the system.
A clear knowledge of functionalities helps them to understand the design and code,
also determines what modifications needed for specific purpose.
3.CHARACTERISTICS OF GOOD SRS DOCUMENT
1. Concise : SRS document should be concise and at the same time unambiguous,
consistent and complete. Irrelevant description reduce readability.
2. Structured : It should be well structured for easy understanding and modification.
3. Traceable : Verify the results of a phase with the previous phase, to analyse the
impact of a change.
4. Response to undesired Event :It should characterize acceptable responses to
undesired events.
5. Black Box View : It should specify only what the system should do and refrain
from stating how to do these. Should only specify the external behavior of the
system.
6. Verifiable : Verifiable means that it should be possible to determine wether or not
requirements have been met in implementation.
4.STRUCTURE OF SRS
The requirements document is devised in a manner that is easier to write, review, and
maintain.
It is organized into independent sections and each section is organized into modules
or units.
Note that the level of detail to be included in the SRS depends on the type of the
system to be developed and the process model chosen for its development.
For example, if a system is to be developed by an external contractor, then critical
system specifications need to be precise and detailed.
Similarly, when flexibility is required in the requirements and where an in-house
development takes place, requirements documents can be less detailed.
3
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Each SRS fits a certain pattern; thus, it is essential to standardize the structure of the
requirements document to make it easier to understand.
For this IEEE standard is used for SRS to organize requirements for different
projects, which provides different ways of structuring SRS.
Note that in all requirements documents, the first two sections are the same.
……………………………………………………………………………………….
Contents of SRS Document (or) Important Categories of Customer Requirements
The different user requirements can be categorized into following categories:
6
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
1. Functional Requirements
2. Non-functional Requirements
3. Goals of Implementation
1. Functional Requirements
Functional requirements discuss the functionalities required by the users from the
system.
It clearly described each function along with the corresponding input and output data
set.
First we have to identify the high level function of the system.
After that it can be split into smaller sub requirements.
High level function is one using which the user can get some useful piece of work
done.
A high level function usually requires a series of interactions between the system and
one or more users.
Identifying the functional Requirements:
Each high level requirement characterized way of system usage (service
invocation) by some user to perform some meaningful piece of work.
First identify the different types of users who might use the system and then
identify the different services expected from the software by different types of
users.
Documentation of functional requirement
Once all the high level requirement have been identified, they can be documented.
A function can be documented by identifying the state at which the data is to be input
to the system, its input data domain, the output data domain and the type of
processing to be carried on the input data to obtain the output data.
It has several sub-requirements corresponding to the different user interactions.
These different interaction sequences capture the different scenarios.
7
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
R.1.1. Select withdraw amount option
Input : “withdraw amount “option
Output :User prompted to enter the account type
Processing : The amount is debited from the user’s account if sufficient balance is
available otherwise an error message is displayed.
3. Goals of Implementation
The goals of implementation part of the SRS document offers some general
suggestions regarding development.
The developers may take these suggestions into account if possible.
The goals of implementation section might document issues such as revisions to the
system functionalities that may be required in the future; new devices supported in
future reusability issues etc.
Not checked by the customer for conformance at the time of acceptance testing
Organization of the SRS Document
SRS document can be organized as follows:
Introduction
8
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Goals of implementation
Functional requirements
Non-functional requirements
Behavioural description
4.Data store symbol :a data store is represented using 2 parallel lines.it represents a
logical file or a physical file on disk.
5.Output symbol :The output symbol is used when a hard copy is produced.
9
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
If two bubbles are connected through a data store, then the speed of operation of the
bubbles are independent.
Data Dictionary
It lists the purpose of all data items and the definition of all composite data items in
terms of their component data items.
There will be several DFD but has a single data dictionary.
Advantages of data Dictionary
1. Provides standard terminology for all relevant data.
2.Helps the developers to determine the definition of different data structures.
3. The data dictionary helps to perform impact analysis
Data Definition :
Composite data items can be defined in terms of primitive data items using the
following operators.
1. + : Denotes composition of two data items eg: a+b represents a and b
2. [, ,] : represents selection eg: [a,b] means either a occurs or b occurs
3. () ; represent optional data eg : a+(b) means either a or a+b occurs
4. {} : represent iterative data definition eg : {name}5 represent 5 name data
5. = : represents equivalence
6. /* */ : considered as comment
Developing DFD Model of a system
DFD model represents how much each input is transformed to its corresponding
output data through a hierarchy of DFDs.
The DFD model of a problem consists of many DFD’s and a single data dictionary.
Top level DFD is called a level 0 DFD or context diagram.
At each successive lower levels DFDs, more and more details are gradully
introduced.
Lower DFD’s are constructed by the decomposition of the higher level functions.
Context Diagram
Most abstract (highest level)data flow representation of a system.
Entire system as a single bubble.
Bubble is annotated as name of the software system being developed.
Only bubble in the DFD model where noun is used for naming.
Purpose of the context diagram is to capture the context of the system.
Level 1 DFD
Contains 3 to 7 bubbles.
To develop the level 1 DFD , examine high level function requirements in SRS
document .
10
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
11
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
The data flow into or out of a bubble must match the data flow at the next level of
DFD. This known as balancing DFD.
Eg: RMS CALCULATING SOFTWARE
Rms system should read 3 integral values from user in the range of -1000 to 1000 and
would determine the root mean square of three inputs and display it.
LEVEL-1 DFD
LEVEL-2 DFD
12
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Data Dictionary :
Data-items : { integer}3
rms : float
a: integer
b: integer
c: integer
asq :integer
bsq : integer
csq: integer
msq:integer
Project planning is undertaken and completed even before any development activity
starts.
Consist of following activities
1. Estimation : The following project attributes have to be estimated.
i. Cost How much is it going to cost to develop the software?
ii. Duration How long is it going to take to develop the product?
iii. Effort How much effort would be required to develop the product?
2. Scheduling : Schedules for manpower and resources were developed.
3. Staffing : Staff organization and staff plans have to be made.
4. Risk Management : Risk identification, analysis and planning have to be done.
5. Miscellaneous Plans : Other plans such as quality assurance, configuration
management, etc have to be done.
Observe that size estimation is the first activity.
Size is the most fundamental parameter based on which all other estimates are made.
Based on size estimation, the effort required to complete the project and duration are
estimated.
Based on the effort estimation the cost of the project is computed.
The estimated cost forms the negotiations with customer made.
13
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Software Design
The activities needed to transform the SRS Document into design document.
Software design is the process of implementing software solutions to one or more
sets of problems.
One of the main components of software design is the software requirements
analysis (SRA).
SRA is a part of the software development process that lists specifications used in
software engineering.
Through high level design, a problem is decomposed into a set of modules, the
control relationships among various modules identified, and also the interfaces
among various modules are identified.
The outcome of highlevel design is called the program structure or the software
architecture.
Many notations are used to represent a high level design.
A notation that is widely being used for procedural development is structure chart.
Another technique is UML being used in object oriented designs.
Once the high level design is complete, the detailed design is undertaken.
14
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
During detailed design, each module is examined carefully to design its data
structures and the algorithms.
The outcome of detailed design stage is usually documented in the form of a module
specification(MSPEC) document.
Modularity:
1)Structured Analysis
Purpose is to capture the detailed structure of the system.
Based on the following principles :
16
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
1. Top down decomposition approach
2. Application of divide and conquer principle.
3. Graphical representation of the analysis results using DFDs
2)Structured Design
Theaimofstructureddesignistotransformtheresultsofthestructuredanalysis(i.e.aDFD
representationintoastructurechart) into structure chart.
Representsthesoftwarearchitecture.
The structure chart representation can be easily implemented using some
programming language.
The basic building blocks using which structure chart are designed are the following:
Building blocks
1. Rectangular boxes : represents module, annotated with name of the module
2. Module Invocation Arrows : during the execution control is passed from one
module to the other in the direction of arrow.
3. Data Flow arrows : data passing from one module to another in the direction of
arrow
17
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
6. Repetition :A loop around control flow arrows denotes that the concerned modules
are invoked repeatedly.
18
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Structure chart of RMS calculator:
Detailed Design
Pseudo code description of the processing and the different data structure are
designed for the different modules of the structure chart
Usually described in the form of Module specification( MSPEC)
MSPEC written in structured English
19
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
UML DIAGRAMS
UML can be used to construct 9 different types of diagrams to view five different
views of system.
If a single model is made to capture all the required perspective, then it would be as
complex as the original problem, and would be of very little use.
2.Structural View:
Defines the structure of the problem in terms of objects.
Also called as static model
3. BehaviouralView:
Capture how objects interact with each other in time to realize the system behaviour.
Dynamic model of the system
20
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
4. ImplementationView :
Captures important components of the system and their interdependencies.
5.Environmentalview :
This view models how different components are implemented on different pieces of
hardware.
TextDescription
Eachellipseontheusecasediagramshouldbeaccompaniedbyatext description.
The textdescription should define the details of the
interactionbetweentheuserandthecomputerandotheraspectsoftheusecase.
Thefollowingare some ofthe information which may be included in a use case text
description
Contact persons:This section liststhepersonnel oftheclient
organizationwithwhomtheusecasewasdiscussed,dateandtimeofthemeeting,etc.
Actors:Inadditionto identifying the actors, some information about
actorsusingthisusecasewhichmayhelptheimplementationoftheusecasemayberecorded.
Pre-condition:Thepreconditionswoulddescribethestateofthesystem before the use case
executionstarts.
Post-
condition:Thiscapturesthestateofthesystemaftertheusecasehassuccessfullycompleted.
Non-functional requirements :Constraints such as platform and environment
conditions, qualitative statements, responsetimerequirements,etc.
Exceptions, error situations: Errors that are not domain related, such as software
errors,neednotbediscussedhere.
22
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Sampledialogs: Theseserveasexamplesillustratingtheusecase.
Specificuser
interfacerequirements:Thesecontainspecificrequirementsfortheuserinterfaceoftheuseca
se.Forexample,itmaycontainformstobeused,screenshots,interactionstyle,etc.
Documentreferences:This part contains reference storelated documents which may be
useful to understand the system operation.
Factoring of use cases
It is often desirable to factor usecases into component usecases.
Actually, factoring of usecases are required under two situations. First, complex
usecases need to be factored into simpler usecases.
Secondly, usecases need to be factored whenever there is common behaviour across
different use cases
Factoring would make it possible to define such behaviour only once and reuse it
when ever required
UML offers three mechanisms for factoring of usecases as follows:
Generalization
Usecase generalization can be used when one usecase that is similar to another, but
does something slightly differently or something more.
Generalization works the same way with use cases as it does with classes.
Representation of use case generalization
Pay
membership fee
Includes
The includes relationship in the older versions of UML (priortoUML1.1) was known
as the uses relationship.
The includes relationship involves one usecase including the behaviour of another
usecase in its sequence of events and actions.
Representation of use case inclusion
23
<<include>
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Extends
Themainideabehindtheextendsrelationshipamongtheusecasesis
thatitallowsyoutoshowoptionalsystembehaviour.
Anoptionalsystem behaviour isextended only under certain conditions.
The extends relationship is similar to generalization.
But unlike generalization,theextendingusecase canaddadditional behaviour onlyat an
extensionpoint only when certain conditions are satisfied.
Theextensionpointsarepointswithintheusecasewherevariationto the
mainline(normal)actionsequencemayoccur.
Theextendsrelationshipis normallyusedtocapturealternatepathsorscenarios.
Example of use case extension
Structural view
1. Class Diagrams
24
Base Use Common
case Use case
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Aggregation
Special type of association relation where the involved classes are not only associated
to each other , but a whole part relationship exists between them.
Not only knows the address of its parts, but also invokes the responsibility of creating
and destroying its parts.
1 * 1
Documen Paragraph Lin
t e
Composition
Stricter form of aggregation.
The life of parts cannot exist outside whole.
Order 1 * Item
25
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Inheritance
Represented by using empty arrows pointing from sub class to super class
Dependency
Represented by dotted arrows
Constraints
Describes a condition or an integrity rule
to specify post- and pre- conditions for operations.
2. Object Diagrams
Shows snap shot of objects at a point of time.
Often called as instance diagram.
Objects are drawn using rounded rectangles.
Behavioural view
1. Interaction Diagrams
26
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
2. Collaboration diagram
27
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
3. Activity Diagram
28
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Used to model how the state of an object changes in its life time
Describes how the behaviour changes in several use case execution
Based on Finite State machine (FSM) formalism
Major disadvantage is that state explosion problem
Basic elements in the state chart diagram is as follows :
1. Initial state : represented as filled circle
2. Final State : This is represented by a filled circle inside a larger circle
3.State : These are represented by rectangles with rounded corners
4. Transition : arrow between two states
Implementation view
1. Component diagram
Component diagram is a special kind of diagram in UML. The purpose is also
different from all other diagrams discussed so far.
It does not describe the functionality of the system but it describes the
components used to make those functionalities.
29
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
Environment view
1. Deployment diagram
A deployment diagram is a UML diagram type that shows the execution
architecture of a system, including nodes such as hardware or software execution
environments, and the middleware connecting them.
Deployment diagrams are typically used to visualize the physical hardware and
software of a system.
30
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
LEVELED DFD
EXAMPLES:-
31
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
EXAMPLE 2”-
32
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
33
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
34
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
36
PROJECT MANAGEMENT AND SOFTWARE ENGINEERING (5132) S5 CTMODULE :2 SMPC
PKD
37