Functional and Non-Functional Software Requirements Analysis
Functional and Non-Functional Software Requirements Analysis
SOFTWARE ENGINEERING
Course Code: 22CSE141
• Types of requirement
• User requirements :Statements in natural language plus
diagrams of the services the system provides and its operational
constraints. Written for customers.
• System requirements : A structured document setting out
detailed - descriptions of the system services. Written as a
contract between client and contractor.
• Software specification : A detailed software description which
can serve as a basis for a design or implementation. Written for
developers.
7
8
9
Contents
• Requirements
• Functional
• Non-Functional
• User Requirements
• The Software Requirements Document
10 / 26
Functional and Non functional Requirements
Functional Requirements:
• These are the requirements that the end user specifically demands as basic
facilities that the system should offer.
• All these functionalities need to be necessarily incorporated into the system as
a part of the contract.
• describe the requested functionality/behaviour of the system: services
(functions), reactions to inputs, exceptions, modes of operations
11
FUNCTIONAL REQUIREMENTS NON FUNCTIONAL REQUIREMENTS
1. A functional requirement defines a system or its A non-functional requirement defines the quality
component. attribute of a software system.
2. It specifies “What should the software system It places constraints on “How should the software
do?” system fulfill the functional requirements?”
7. Helps you verify the functionality of the Helps you to verify the performance of the
software. software.
8. Functional Testing like System, Integration, Non-Functional Testing like Performance, Stress,
End to End, API testing, etc are done. Usability, Security testing, etc are done.
Jain University
14 / 26
User Requirements
• User requirements:
• Should be understood by the user, and should not address
design and implementation aspects
• Should focus on the key facilities required
• Problems with requirements written in natural language:
• Lack of clarity, ambiguity, various interpretations possible
• Confusion, lack of separation between different types of
requirements
• Mixture of several requirements in the same statement
• Hard to modularize and thus hard to find connections between
requirements
15 / 26
Jain University
User Requirements …
• Guidelines for writing requirements:
• Create and use a standard format for the entire software requirements specification
• Highlight important parts of the requirement statements
• Use consistently the language (difference between “should” and “shall”)
• Avoid computer jargon
16 / 26
Jain University
The Software Requirements Document
• This document, also called Software Requirements Specification
(SRS), is the official description of the system’s requirements
(includes user and system reqs.)
17 / 26
Jain University
Software Requirements Document
• SRS structure according IEEE/ANSI 830-1993 standard (overview
only, many more details are given in the standard):
• Introduction
• General description
• Specific requirements
• Appendices
• Index
• This structure needs to be tailored for each particular
organization
18 / 26
Software Requirements Specification
• A software requirements specification (SRS) is a document that is
created when a detailed description of all aspects of the software to be
built must be specified before the project is to commence.
• It is important to note that a formal SRS is not always written
1. Introduction
• 1.1 Purpose
• 1.2 Document Conventions
• 1.3 Intended Audience and Reading Suggestions
• 1.4 Project Scope
• 1.5 References
2. Overall Description
• 2.1 Product Perspective
• 2.2 Product Features
• 2.3 User Classes and Characteristics
• 2.4 Operating Environment
19
• 2.5 Design and Implementation Constraints
• 2.6 User Documentation
• 2.7 Assumptions and Dependencies
3. System Features
• 3.1 System Feature 1
• 3.2 System Feature 2 (and so on)
4. External Interface Requirements
• 4.1 User Interfaces
• 4.2 Hardware Interfaces
• 4.3 Software Interfaces
• 4.4 Communications Interfaces
5. Other Nonfunctional Requirements
• 5.1 Performance Requirements
• 5.2 Safety Requirements
• 5.3 Security Requirements
• 5.4 Software Quality Attributes
6. Other Requirements 20
REQUIREMENTS ENGINEERING PROCESS
21
Validating Requirements
Is each requirement consistent with the overall
objective for the system/product?
Have all requirements been specified at the proper
level of abstraction? That is, do some requirements
provide a level of technical detail that is inappropriate
at this stage?
Is the requirement really necessary or does it represent
an add-on feature that may not be essential to the
objective of the system?
Is each requirement bounded and unambiguous?
Does each requirement have attribution? That is, is a
source (generally, a specific individual) noted for each
requirement?
Do any requirements conflict with other requirements?
22
Validating Requirements
Is each requirement achievable in the technical
environment that will house the system or product?
Is each requirement testable, once implemented?
Does the requirements model properly reflect the
information, function and behavior of the system to be
built.
Has the requirements model been “partitioned” in a way
that exposes progressively more detailed information
about the system.
Have requirements patterns been used to simplify the
requirements model. Have all patterns been properly
validated? Are all patterns consistent with customer
requirements?
23
Eliciting Requirements
1 Collaborative Requirements Gathering
meetings are conducted and attended by both software engineers
and customers
rules for preparation and participation are established
an agenda is suggested
a "facilitator" (can be a customer, a developer, or an outsider)
controls the meeting
a "definition mechanism" (can be work sheets, flip charts, or wall
stickers or an electronic bulletin board, chat room or virtual
forum) is used
the goal is
to identify the problem
propose elements of the solution
negotiate different approaches, and
specify a preliminary set of solution requirements
24
2. Quality Function Deployment
Normal requirements: Requirements which are stated
during the meeting with the customer
Example:) normal requirements might be requested types
of graphical displays, specific system functions
Expected requirements: Requirements are implicit to the
product or system that are not explicitly stated by the
customer.
Exciting requirements: features go beyond the
customer’s expectations and prove to be very satisfying
when present.
Example:) software for a new mobile phone comes with
standard features, but is coupled with a set of unexpected
capabilities (e.g., multitouch screen, visual voice mail)
that delight every user of the product.
25
3. Usage Scenarios
• A usage scenario, or scenario for short, describes a real-
world example of how one or more people or
organizations interact with a system.
26
3. Usage Scenarios
•Usage scenarios are applied in several
development processes, often in different ways.
28
Attributes of a Good Software Exhibit
Jain University 29
The System Engineering Process
System Design Problems
• Requirements partitioning to hardware,
software and human components may involve a lot of
negotiation
Non-functional requirements :
• Defines system properties and constraints e.g. reliability, response time and storage requirements. Constraints
are I/O device capability, system representations, etc.
• Can be constraints on the process too
• Use a particular CASE system, programming language or development method
• System maybe unusable if non-functional requirements are not satisfied (Critical)
• Non-functional classifications
Product requirements
• Requirements which specify that the delivered product must behave in a particular way e.g. execution speed,
reliability, etc.
• Organizational requirements
• Requirements which are a consequence of organizational policies and procedures e.g. process standards used,
implementation requirements, etc.
• External requirements
• Requirements which arise from factors which are external to the system and its development process e.g.
interoperability requirements, legislative requirements, etc.
Jain University 32
Objectives of Modular Software Design
• Functional partitioning into discrete scalable , reusable
modules.
• Rigorous use of well-defined modular interface.
• Ease of change to achieve technology transparency and to the
extent possible make use of industry standards for key
interfaces.
• Modularity is the principle of keeping separate the various unrelated
aspects of a system, so that each aspect can be studied in isolation
(also called separation of concerns).
• If the principle is applied well, each resulting module will have a
single purpose and will be relatively independent of the others.
• Each module will be easy to understand and develop easier to locate
faults (because there are fewer suspect modules per fault).
• Easier to change the system (because a change to one module affects
relatively few other modules)
Jain University 33
Layered Architectural style.
Jain University 34
What is Requirement Analysis?
Requirements analysis
specifies software’s operational characteristics
indicates software's interface with other system
elements
establishes constraints that software must meet
Requirements analysis allows the software engineer
(called an analyst or modeler in this role) to:
elaborate on basic requirements established during
earlier requirement engineering tasks
build models that depict user scenarios, functional
activities, problem classes and their relationships,
system and class behavior, and the flow of data as it
is transformed. 35
Elements of Requirement Analysis
36
Scenario-Based Models
Timer
Waiting
Number
do: display Operation
time Full Set time
power do: get number do: operate
exit: set time oven
Half
Half power
Door
power Cancel
Timer closed
Door Start
open Door
Half power Enabled open Waiting
do: set power Door do: display do: display
= 300 closed 'Ready' time
Disabled
do: display
'Waiting' 41
Microwave oven state description
State Description
Waiting The oven is waiting for input. The display shows the current time.
Half power The oven power is set to 300 watts. The display shows ‘Half
power’.
Full power The oven power is set to 600 watts. The display shows ‘Full
power’.
Set time The cooking time is set to the user’s input value. The display
shows the cooking time selected and is updated as the time is set.
Disabled Oven operation is disabled for safety. Interior oven light is on.
Display shows ‘Not ready’.
Enabled Oven operation is enabled. Interior oven light is off. Display
shows ‘Ready to cook’.
Operation Oven in operation. Interior oven light is on. Display shows the
timer countdown. On completion of cooking, the buzzer is
sounded for 5 seconds. Oven light is on. Display shows ‘Cooking
complete’ while buzzer is sounding.
42
Microwave oven stimulus
Stimulus Description
Half power The user has pressed the half power button
Full power The user has pressed the full power button
Timer The user has pressed one of the timer buttons
Number The user has pressed a numeric key
Door open The oven door switch is not closed
Door closed The oven door switch is closed
Start The user has pressed the start button
Cancel The user has pressed the cancel button
43
Behavioural Models
• Behavioural models are used to describe the overall
behaviour of a system
• Two types of behavioural model are shown here
• Data processing models that show how data is
processed as it moves through the system
• State machine models that show the systems response
to events
• Both of these models are required for a description of the
system’s behaviour
Explanation of Data processing models, State machine
models required. Jain University 44
Behavioural Model – State Diagram
45
Data models
46
Data Flow Models
47
Data Flow Diagrams (DFD)
48
Elements of a DFD
• Processes
• Change the data. Each process has one or more inputs
and outputs
• Data stores
used by processes to store and retrieve data (files,
DBs)
• Data flows
-movement of data among processes and data
stores
• External entities
- outside things which are sources or
destinations of data to the system
49
DFD for Order Processing
Checked and
Completed Signed Signed Send to signed order
order form order form order form supplier + order
Order
notification
details + Complete Validate Record
blank order form order order
order form Adjust
Order available
Signed budget
details order form
Order
amount
+ account
details
Orders Budget
file file
50
What is Object Oriented Data Modeling?
•Centers around objects and classes
•Involves inheritance
•Encapsulates both data and behavior
•Benefits of Object-Oriented Modeling
• Ability to tackle challenging problems
• Improved communication between users, analysts, designer,
and programmers
• Increased consistency in analysis and design
• Explicit representation of commonality among system
components
• System robustness
• Reusability of analysis, design, and programming results
51
OO vs EER Data Modeling
Object Oriented ER
54
UML class and object diagram
Class diagram showing two classes
57
STRUCTURED ANALYSIS
58
STRUCTURED ANALYSIS
1. Source traceability information links the requirements to the stakeholders who
proposed the requirements and to the rationale for these requirements. When a
change is proposed, you use this information to find and consult the stakeholders
about the change.