Lecture 5 (1)

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Software Engineering

Lecture 5

[These slides are adapted from Software Engineering: A Practitioner’s Approach, Roger
S. Pressman © 2015 & Software Engineering, Ian Somerville © 2015 ]
Requirements
Engineering- I
Topics Covered

✧ Requirements Engineering
✧ User and System Requirements
✧ Functional and Non-Functional Requirements
Learning Outcomes
✧ Understand the concepts of user and system requirements and why
these requirements should be written in different ways;
✧ Understand the differences between functional and non-functional
software requirements;
Requirements Engineering
✧ Clearly defined requirements are essential signs on the road that
leads to a successful project.
✧ They establish a formal agreement between a client and a provider
that they are both working to reach the same goal.
✧ High-quality, detailed requirements also help mitigate financial risks
and keep the project on a schedule.
✧ According to the Business Analysis Body of Knowledge (BABOK)
definition, requirements are a usable (practical) representation of a
need.
Requirements Engineering
It is essential that the software engineering team understand the requirements of a
problem before the team tries to solve the problem.

RE is software engineering actions that start with communication activity and


continues into the modeling activity.

RE establishes a solid base for design and construction. Without it, resulting
software has a high probability of not meeting customer needs.
Requirements Engineering
Requirements describe the function of the system from the client's viewpoint.

The requirements establish the system's functionality, constraints, and goals.

The requirements must be understandable by both the client and the development
staff.
In other words: A function, constraint or other property that the system must
provide to fill the needs of the system’s intended user(s)
Engineering: implies that systematic and repeatable techniques should be used
Requirement Engineering means that requirements for a product are defined,
managed and tested systematically
Types of Requirements
BABOK, which is a recognized set of business analysis industry standards, offers the following
classification of requirements.

• Business Requirements
• User (Stakeholder) Requirements
• Product / Solution Requirements : Functional Requirements and Nonfunctional Requirements
Business Requirements
• These include high-level statements of goals, objectives, and needs.
• Business requirements do not include any details or specific features.
• They just state the problem and the business objective to be achieved such as
increased revenue/throughput/customer reach, reduced expenses/errors, improved
customer service, etc.
User (Stakeholder) Requirements
• The needs of discrete stakeholder groups (top-level managers, non-management
staff, customers, etc.) are specified to define what they expect from a particular
solution.
• This group serves as a bridge between the generalized business requirements and
specific solution requirements. They are outlined in a User Requirements
Specification and can include, for example, ability to create various reports, view
order history and status, manage customer databases, etc.
Product / Solution Requirements
Solution requirements describe specific characteristics that a product must have to
meet the needs of the stakeholders and the business itself.

They fall into two large groups.

• Functional Requirements define what a product must do, what its features and
functions are.
• Nonfunctional Requirements describe the general properties of a system. They are
also known as quality attributes.
What is a Requirement?
✧ A statement of what:
▪ The system must do or
▪ Characteristics it must have
✧ Analysis requirement written from businessperson perspective ( focus on the “what” of system)
✧ They focus on business user need so they usually are called business requirements (or user
requirements).
✧ Later requirements (in design phase), business requirements evolve to become more technical and
they describe “how” the system will be implemented.
✧ Requirements in design are written from the developer perspective, and they usually called system
requirements.
✧ Business requirement and System requirement are used interchangeably.
Requirements in Software Development
Feasibility and
Planning Requirements All process
models include a
requirements
activity

Design

Operation and
Implementation Maintenance
Difference between a user requirement and
a requirements specification

A Requirement is a statement of one thing a product must do or a quality it must


have. A Requirement Specification is a collection of the set of all requirements that are
to be imposed on the design and verification of the product.

The term requirement generally refers to a customer need while specification refers to a detailed, usually technical description
of how that need will be met.
Requirements & Specifications
Problem domain Software (Solution) domain

Describes
problem

Requirements Specification Program


Customer

Specifies

Analyzes Develops
We receive “customer
problem statement,” not the
requirements!

Software Engineer
Requirement vs Specification in Software Engineering

Requirements are descriptions of services that Specification is a technical document that


a software system must provide and the describes the features and behavior of a
constraints under which it must operate. software application.
Steps in Defining the Requirements
Defining the requirements can be divided into several steps:
•Analysis to establish the functionality by consultation with client, customers, and users.
•Modeling to organize the requirements in a systematic and comprehensible manner.
•Define, record, and communicate the requirements.
Heavyweight processes go through these steps for the entire system before beginning the
design.
With lightweight processes, these steps are done separately for each sprint.
User and System Requirements
System Stakeholders
✧ Any person or organization who is affected by the system in some way and so who has a legitimate
interest (any interest that provides a benefit to one or more parties) in.
✧ Stakeholder types
▪ End Users
▪ System Managers
▪ System Owners
▪ External Stakeholders
Why is Getting Good Requirements
Hard?
• Stakeholders don’t know what they really want.
• Stakeholders express requirements in their own terms.
• Different stakeholders may have conflicting requirements.
• Organizational and political factors may influence the system requirements.
• The requirements change during the RE process. New stakeholders may emerge and the business
environment change.
Why are Requirements Important?
Causes of Failed Software Projects

Incomplete requirements 13.1%

Lack of user involvement 12.4%


Lack of resources 10.6%
Unrealistic expectations 9.9%
Lack of executive support 9.3%
Changing requirements & specifications 8.8% Failures to understand the requirements
8.1% led the developers to build the wrong
Lack of planning
system.
System no longer needed 7.5%
Source: Standish Group
Functional Requirements Non-functional Requirements

A functional requirement defines a system or its component. A non-functional requirement defines the quality attribute of a software system.

It places constraints on “How should the software system fulfill the functional re-
It specifies “What should the software system do?”
quirements?”

Non-functional requirement is specified by technical peoples e.g. Architect, Tech-


Functional requirement is specified by User.
nical Leaders and Software Developers.

It is captured in use case. It is captured as a quality attribute.

Helps you verify the functionality of the software. Helps you to verify the performance of the software.
Functional and Non-functional
Requirements
Requirements are often classified as functional or non-functional
requirements
Functional Requirements
The definition of a functional requirement is:

“Any Requirement Which Specifies What The System Should Do.”


In other words, a functional requirement will describe a particular
behavior or function of the system when certain conditions are met, for
example: “Send email when a new customer signs up” or “Open a new
account”.
Non-Functional Requirements
The definition of a non-functional requirement is:

Any Requirement That Specifies How The System Performs A Certain


Function.”
In other words, a non-functional requirement will describe how a system
should behave and what limits there are on its functionality.
They specify criteria that judge the operation of a system, rather than
specific behaviors, for example: “Modified data in a database should
be updated for all users accessing it within 2 seconds.”
Example:

Let’s take an example of a functional


requirement. A system loads a webpage
when someone clicks on a button. The
related non-functional requirement
specifies how fast the webpage must
load.

A delay in loading will create a negative


user experience and poor quality of the
system even though the functional
requirement is fully met.
non-functional requirements specify the system’s
‘quality characteristics’ or ‘quality attributes’.
Functional Requirements
✧ Functional requirements examples
✧ Functional requirements need to be clear, simple, and unambiguous. Here are
some examples of well-written functional requirements:

✧ The system must send a confirmation email whenever an order is placed.


✧ The system must allow blog visitors to sign up for the newsletter by leaving their
email.
✧ The system must allow users to verify their accounts using their phone number.
Functional Requirements
Every functional requirement typically has a set of related non-
functional requirements, for example:

✧ Functional requirement: "The system must allow the user to submit


feedback through a contact form in the app."

✧ Non-functional requirement: "When the submit button is pressed,


the confirmation screen must load within 2 seconds."
How to determine a set of functional requirements
✧ Understand the domain, determining the business processes and
business events.
✧ Determine the scope of the new system, and which business events
are relevant.
✧ Draw up a set of use cases for the product associated with those
events.
✧ Describe each use case by one or more scenarios – sets of steps.
✧ Work through each step of each scenario to determine a set of
system requirements.
Nonfunctional Requirements
✧ Nonfunctional requirements refer to behavioral properties that
the system must have, such as operational (e.g. the physical and
technical environment in which the system will operate),
performance (e.g. the speed, capacity, and reliability), security
(e.g. who has authorized to access to the system), cultural and
political (e.g. company policy says that we only buy computers
from dell), Look and feel.

For example, while we may have a requirement that a


banking system should compute and display a client’s balance, we may also have
nonfunctional requirements attached to this, such as that it should be done securely, and
within, say, five seconds

Slide 31
Functional & Non-Functional Requirements

What the system should do How the system should perform.

Examples: Examples:
User authentication Performance (response time, throughput)
Report generation Reliability
Search functionality Scalability
Usability
Security
“The system shall allow users to reset their
passwords” “The system shall achieve a response time
of less than 2 seconds for 95% of user
transactions."
Nonfunctional Requirements
In Robertson and Robertson (2006), the authors identify the following eight classes of
non-functional requirement:
• look-and-feel requirements – the spirit of the product’s appearance;
• usability requirements – the product’s ease of use, and any special usability
considerations;
• performance requirements – how fast, how safe and how accurate the functionality
must be;
• maintainability and portability requirements – expected changes, and the time
allowed to make them;
• security requirements – the security and confidentiality of the product;
• cultural and political requirements – special requirements that come about because of
the people involved in the product’s development and operation;
• legal requirements –Laws of the state

Slide 33
Look-and-feel Requirements
• Definition: Describes
Look-and-feel requirements describe the the aesthetic and
overall appearance and behavior of the perceptual aspects of the
product to its users. (the spirit of the product's appearance.
product’s appearance)
• Example: The user
interface should have a
For example, in a banking environment, we modern and visually
might want the product to have a appealing design to
conservative feel, with limited use of enhance user experience.
colors and animation. If the product is a
game, then the opposite might apply.

Slide 34
Usability Requirements
• Definition: Focuses on the
ease of use and user
Usability is the degree of ease with which the user will experience of the product.
interact with your products to achieve required goals
effectively and efficiently.
• Example: The system
Usability focuses on the appearance of the user should provide clear and
interface and how people interact with it. What color are intuitive navigation, ensuring
the screens? How big are the buttons? that users can easily
understand and interact with
the product’s ease of use the interface.

Slide 35
Performance Requirements
• Definition: Specifies how fast,
safe, and accurate the
functionality of the system
must be.

• Example: The system should


be capable of processing 1000
transactions per second with a
response time of less than 2
seconds.

Slide 36
Maintainability and Portability Requirements
• Definition: Addresses the
ease of maintaining and
making changes to the
software, as well as its
portability to different
environments.

• Example: The system should


be designed to accommodate
changes easily, and any
updates should be
implemented within a
specified time frame.
Additionally, the software
A portable application (portable app) is a software product designed to be easily should
moved frombe portable across
one computing
environment to another. different operating systems.
Security Requirements

• Definition: Concerned with ensuring


the security and confidentiality of the
product.

• Example: The system should


implement encryption for sensitive
user data during transmission and
storage to prevent unauthorized
access.
Cultural Requirements
Definition: Special requirements
that arise due to the cultural and
political context of the people
involved in the product's
development and operation.

Example: The system should


support multiple languages and
cultural preferences to cater to a
diverse user base.
Character Customization in a Game :
Players should have the option to
customize their characters' appearances,
including hairstyles, facial features, and
clothing, to reflect a diverse range of
cultural influences
Legal Requirements
The laws and standards that apply to • Definition: Involves
the product compliance with laws and
regulations relevant to the
product.

• Example: The system must


adhere to data protection
laws, ensuring the privacy
and lawful use of user data.
Conflicting Requirements
✧ Conflicting requirements are when a customer asks you to make
the system do two things you can't possibly do at the same
time-

✧ Requirements Conflicts : for example, if one requirement asks for


the product to "be available to all" and another says it shall be "fully
secure," then both requirements cannot be implemented as
specified.
Conflicting Requirements
✧ An example of a conflicting requirement might be that the Human
Resources stakeholder group explicitly requests to capture the age
of an employee, but the Data Privacy team is saying that the age of
the employee may not be captured or used in reporting
Conflicting Requirements (Examples)
Performance vs. Cost:
Requirement 1: The system should be capable of processing a large volume of transactions within milliseconds.
Requirement 2: The development cost should be minimized.
Conflict Explanation: Achieving ultra-fast processing may require high-performance hardware, which could increase
development costs, creating a conflict between the desire for optimal performance and cost minimization.

User-Friendly vs. Highly Customizable:


Requirement 1: The system should have a user-friendly interface with minimal complexity.
Requirement 2: Users should have extensive customization options for advanced configurations.
Conflict Explanation: A user-friendly interface might conflict with the desire for a highly customizable system, as too
many options could make the interface complex and less user-friendly.

Data Security vs. Accessibility:


Requirement 1: The system should have robust data security measures.
Requirement 2: The system should be easily accessible from any location.
Conflict Explanation: Implementing strong security measures may involve additional authentication steps or access
restrictions, potentially conflicting with the desire for easy accessibility.
Exercise I
Here is a list of requirements that apply to the product X. For each
requirement, say whether it is a functional or non-functional
requirement.
(a) X must check a user’s identity.
(b) X must check a user’s password.
(c) X must produce a statement of the user’s account.
(d) X must validate the user’s identity and password within 3 second
Exercise I (Answers)
Here is a list of requirements that apply to the product X. For each
requirement, say whether it is a functional or non-functional requirement.
(a) X must check a user’s identity. (Functional Requirement )
(b) X must check a user’s password. (Functional Requirement )
(c) X must produce a statement of the user’s account. (Functional Requirement )
(d) X must validate the user’s identity and password within 3 second. (Non - Functional Requirement )
Exercise II
Identify whether it is a functional or non-functional requirement:

1.Authentication of a user when he/she tries to log into the system.


2.Emails should be sent with a latency of no greater than 12 hours.
3.Each request should be processed within 10 seconds.
4.Verification email is sent to user whenever he/she registers for the
first time on some software system.
5.The site should load in 3 seconds when the number of simultaneous
users are > 10000
Exercise II (Answers)
Identify whether it is a functional or non-functional requirement:

1.Authentication of a user when he/she tries to log into the system.


2.Emails should be sent with a latency of no greater than 12 hours.
3.Each request should be processed within 10 seconds.
4.Verification email is sent to user whenever he/she registers for the first time on some software
system.
5.The site should load in 3 seconds when the number of simultaneous users are > 10000

✧ Requirements 1 and 4 are functional requirements as they describe specific features or


functionalities.
✧ Requirements 2, 3, and 5 are non-functional requirements as they set constraints or describe
aspects related to the performance, behavior, or quality of the system.
Thank you

You might also like