Unit 2 Software Requirement Analysis and Design
Unit 2 Software Requirement Analysis and Design
SRS – Benefits
SRS provides foundation for design work. Because it works as a input to the design phase.
It enhances communication between customer and developer.
Developers can get the idea what exactly the customer wants.
It reduces the development cost and time.
It enables project planning and helps in verification and validation process.
SRS – Content
Customer Requirements:
Customer requirement are the important aspect of the SRS document.
It represents the needs, expectations, and desires of the end-user, customers and other
stack holders who will be using the software product.
Functional requirement:
The functional requirement is the services or functionalities that the system is
expected to provide.
Non-Functional requirement:
The non functional requirements describe the characteristics of the system that can‟t
be expresses functionality.
Ex: portability, maintainability, usability, security etc.
Constraint:
That describes what the system should do or should not do.
Characteristics of SRS
Concise
SRS should contain brief and concise information regarding the project; no more
detailed description of the system should be there.
Complete
It should be complete regarding to the project. So, it can be easily understood by the
analyst and developer.
Consistent
An SRS should be consistent through the project development.
Requirement may not conflict at later stage..
Structured
SRS should be well structured to understand and to implement.
Black-Box View
SRS should have block box view means; there should not be much detailing of the
project in it.
Verifiable
It should be verifiable by the clients or the customers for whom the project is being
made.
Adaptable
It should be adaptable in both sides from the clients as well as from the developers.
Maintainable
SRS should be maintainable so in the future change can be made easily.
Portable
It should be portable as we can use the contents of it for the same types of
development.
Unambiguous
There should not be any alternates of SRS that creates ambiguity.
Traceable
Each of the requirements should be clear and refer to the future development.
i. Customer Requirements:
The SRS document should accurately capture all customer requirements, which are
typically gathered through various methods,such as interviews,surveys,focus groups,and
market research.
The requirements should be clear,unambiguous,specific,measurable,and traceable to ensure
thar the software meets the customer‟s expectations.
How to identify customer’s requirements:
The are several ways by which we can help to identify the requirements of customers.
Conduct interviews
Analyse existing system
conduct workshops
Have customer feedback
Analyze competitors
Once you have identified customer requirements, it is important to document them in a
clear and concise manner in the SRS document.
This document will serve as a blueprint for the development team to ensure that the
software product meets the needs and expectations of the customers.
Steps to write customer requirements in SRS
Identify the customers – determine for whom the software is being developed.
Gather requirements – conduct interviews, surveys and feedback sessions to get exact
customer requirements.
Organize the requirements - Organize the requirements based on their importance and
properties.
Use consistent format - Use consistent format ( i.e. Requirement
ID,rational,description,functional and Non-functional requirements).
Security
Scalability
Usability
Performance
Inter operability
Availability
i. Functionality: The software meets the requirements and specifications that it was
designed for, and it behaves as expected when it is used in its intended environment.
ii. Usability: The software is easy to use and understand, and it provides a positive user
experience.
iii. Reliability: The software is free of defects and it performs consistently and accurately
under different conditions and scenarios.
iv. Performance: The software runs efficiently and quickly, and it can handle large
amounts of data or traffic.
v. Security: The software is protected against unauthorized access and it keeps the data
and functions safe from malicious attacks.
vi. Maintainability: The software is easy to change and update, and it is well-
documented, so that it can be understood and modified by other developers.
vii. Reusability: The software can be reused in other projects or applications, and it is
designed in a way that promotes code reuse.
viii. Scalability: The software can handle an increasing workload and it can be easily
extended to meet the changing requirements.
ix. Testability: The software is designed in a way that makes it easy to test and validate,
and it has comprehensive test coverage.
2. Analysis Vs Design
Classification of Cohesion
Classification of Coupling
Coupling between two modules is a measure of the degree of interaction between two
modules.
Coupling refers to the no of connections between „calling‟ and a „called‟ module.
Classification of coupling
1. Data (Low) (Best)
2. Stamp
3. Control
4. Common
5. Content (High) (Worst)
I. Data Coupling
Two modules are data coupled, if they communicate using an elementary data item that is
passed as a parameter between the two.
Ex: an int, a char etc
It is a lowest coupling and best for software development.
Two modules are common coupled, if they share data through some global data items.
V. Content Coupling
Content coupling exists between two modules, if they share code.
Ex:- a branch from one module into another module.
It is a highest coupling and creates more problems in S/W development.
Process (Function)
External Entity
i. Entity is represented by rectangle.
ii. Entities are external to the system which interacts by inputting data to the
system or by consuming data produced by the system.
iii. It can also define source or destination of the system.
Data Flow
i. Data flow is represented by an arc or by an arrow.
ii. It is used to describe the movement of the data.
iii. It represents the data flow occurring between two processes or between an
external entity and a process.
iv. It passes data from one part of the system to another part.
v. Data flow arrows usually annotated with the corresponding data names.
Data Store
i. Data store is represented by two parallel lines.
ii. Generally it is a logical file or database.
iii. It can be either a data structure or a physical file on the disk.
Output
i. Output is used when a hardcopy is produced.
ii. It is graphically represented by a rectangle cut either a side.
DFD graphically shows the transformation of the data input to the system to the final
result through a hierarchy of levels.
DFD starts with the most abstract level of the system and at each higher level, more
details are introduced.
Context diagram:
i. To develop higher level DFDs, processes are decomposed into their sub
functions. The abstract representation of the problem is called as context
diagram.
ii. The context diagram is top level diagram.
iii. It only contains one process node that generalizes the function of entire system
with external entities.
iv. It represents the entire system as a single bubble.
v. Data input and output are represented using incoming and outgoing arrows.
vi. These arrows should be annotated with the corresponding data items.
vii. The bubbles (Circles) are decomposed into sub-functions at the successive
levels of the DFD.
Numbering of bubbles
i. It is necessary to number the different bubbles occurring in the DFD.
ii. The bubble at the context level is usually assigned the number 0 to indicate that
it is 0 levels DFD.
iii. Bubbles at level 1 are numbered as 0.1, 0.2 etc
Starting from the registration process, a student may come to the college for
the admission for a particular course. He/She submits the registration form
and student registration form processing is handled by the College
Administration Information Process.
UML can be used to construct nine types of diagrams to capture five different views of a
system.
Use-Case Diagram
Use case model in UML provides system behavior.
Use cases represent the different ways in which a system can be used by the users.
The purpose of use case is to define the logical behavior of the system without knowing the
internal structure of it.
UML describes “who can do what in a system”
A use case represents a sequence of interactions between the user and the system.
Components of Use Case Diagram:
Use Case
i. Each use case is represented by ellipse with the name of the use case written
inside the ellipse.
ii. All the use cases are enclosed with a rectangle representing system boundary.
iii. Rectangle contains the name of the system.
Actor
i. An actor is anything outside the system that interacts with it.
ii. Actors in the use case diagram are represented by using the stick person icon.
iii. An actor may be a person, machine or any external system.
iv. In use case diagrams, actors are connected to use cases by drawing a simple line
connected to it.
v. Actor triggers use case.
vi. Each actor must be linked to a use case, while some use cases may not be linked
to actors.
Relationship
i. Actors are connected to the use cases through relationship.
ii. An actor may have relationship with more than one use case and one use case
may relate to more than one actor.
iii. Types of relationship
1. Association
2. Include Relationship
3. Extend Relationship.
Association
i. This relationship is the interface between an actor and a use case.
ii. It is represented by joining a line from actor to use case.
Include Relationship
i. It involves one use case including the behavior of another use case.
ii. The “include” relationship occurs when a chunk of behavior that is similar
across a number of use cases.
Extend Relationship
i. It allows you to show optional behavior of the system.
ii. This relationship among use cases is represented as a stereotype <<extend>>.
iii. Extend relationship exists when one use case calls another use case under
certain condition.
Class Diagram
Class diagrams are the most common diagrams used in UML. Class diagram
consists of classes, interfaces, associations, and collaboration.
Class diagram describes the attributes and operations of a class and also the
constraints imposed on the system.
The sequence diagram represents the flow of messages in the system and is also termed as an
event diagram.
It represents the communication between any two lifelines as a sequence of events.
In UML, the lifeline is represented by a vertical bar, whereas the message flow is represented
by a vertical dotted line that extends across the bottom of the page.
5 Messages The messages depict the interaction between the objects and are
represented by arrows. They are in the sequential order on the
lifeline. The core of the sequence diagram is formed by
messages and lifelines
Following are types of messages enlisted below:
5.1 Call Message It defines a particular
communication between
the lifelines of an
interaction, which
represents that the target
lifeline has invoked an
operation.
5.4 Recursive
A self message sent for
Message
recursive purpose is
called a recursive
message. In other words,
it can be said that the
recursive message is a
special case of the self
message as it represents
the recursive calls.
5.5 Create Message
It describes a
communication,
particularly between the
lifelines of an interaction
describing that the target
(lifeline) has been
instantiated.
5.6 Destroy Message It describes a
communication,
particularly between the
lifelines of an interaction
that depicts a request to
destroy the lifecycle of
the target.
Activity Diagram
Activity diagram is a UML diagram that is used to model a process.
Activity diagrams consist of activities, states and transitions between activities and
states.
It describes how the events in a single use case relate to one another.
Activity diagrams represent workflows in a graphical ways.
The AIM of Activity diagram is to record the flow of control from one activity to
another of each actor and show interaction between them.
Activity diagrams are similar to procedural flow charts. The difference is that
activity diagram support parallel activities.
Elements of Activity Diagram
Activity
i. It represents a particular action taken in the flow of control.
ii. It is denoted by a rectangle with rounded edges and labeled inside it
describing corresponding activity.
Flow
i. A FLOW is represented with a directed arrow.
ii. This is used to show transfer of control from one activity to another.
Decision
i. A decision node represented by diamond.
Merge
i. This is represented with a diamond shape with two or more input
transitions and a single output.
Fork
i. Fork is a point where parallel activities begin.
ii. Fork is denoted by black bar with one incoming transition and several
outgoing transitions.
Join
i. Join is denoted by a black bar with multiple incoming transitions and
single outgoing transition.
ii. It represents the synchronization of all concurrent activities.
Note
i. UML allows attaching a note to different components of diagram to
present some textual information.
ii. It could be some comments or may be some constraints.
iii. It is denoted by a rectangle with cut a side.