Ses03 Requirements
Ses03 Requirements
Software Engineering
Muním Zabidi
Faculty of Electrical Engineering, UTM
Table of Contents
3 Requirements Validation
4 Requirements Elicitation
6 Use Cases
7 User Stories
8 Activity Diagrams
9 References
© Muním Zabidi 2
What Are Requirements
© Muním Zabidi 3
Scope of Software Project Failures
Jim Johnson, The Standish Group International Project Leadership Conference, May 1995, Chicago
© Muním Zabidi 5
Relative Cost to Fix an Error
© Muním Zabidi 6
What Are Requirements?
© Muním Zabidi 7
Requirements Engineering
© Muním Zabidi 8
Stakeholders
A stakeholder is anyone who should have some direct or indirect influence on the
system requirements.
© Muním Zabidi 9
Types of Requirements
Software requirements specify what to build, not how. It describes the problem, and not the
detailed solution.
Functional requirements
Describe what the system should do.
Can be objectively measured and verified
They are often called product features.
Examples: login feature, add item to cart, checkout process
Non-functional requirements
Describe how the system should perform
Related to attributes rather than functionality
More subjective and broader in scope
Examples: performance, usability, reliability, maintainability, scalability
© Muním Zabidi 10
FURPS+
© Muním Zabidi 11
FURPS
© Muním Zabidi 12
FURPS+
© Muním Zabidi 13
Requirements Engineering Process
© Muním Zabidi 14
Steps in Requirements Engineering
Draft Validated
Feasibility
requirements requirements
report
document document
© Muním Zabidi 15
SE Phases & Outputs
© Muním Zabidi 16
Models in Requirements Engineering
System
Sequence Deployment
Sequence
Diagram Diagram
Diagram
© Muním Zabidi 17
Feasibility Study
© Muním Zabidi 18
Information Gathering
© Muním Zabidi 19
Defining the Requirements
© Muním Zabidi 20
Writing the Requirements
© Muním Zabidi 21
Writing the Requirements
Shall (== is required to):
used to indicate mandatory requirements strictly to be followed in order to
conform to the standard and from which no deviation is permitted. (must or
will is obsolete)
Should (== is recommended that):
used to indicate
among several possibilities one is recommended as particularly suitable,
without mentioning or excluding others
or that a certain course of action is preferred but not necessarily required;
or that (in the negative form) a certain course of action is deprecated but
not prohibited
May (== is permitted to):
used to indicate a course of action permissible within the limits of the standard
Can (== is able to):
used for statements of possibility and capability, whether material, physical, or
causal
https://development.standards.ieee.org/myproject/Public/mytools/draft/styleman.pdf See Section 9 [IEE20]
© Muním Zabidi 22
Prioritizing the Requirements
© Muním Zabidi 23
Levels of Detail
© Muním Zabidi 24
Requirements Validation
© Muním Zabidi 25
Requirements Validation
© Muním Zabidi 26
Requirements Validation
© Muním Zabidi 27
Requirements Elicitation
© Muním Zabidi 28
Information Gathering Techniques
A system analyst must have the ability to gather the right information so that the system
requirements are accurate and complete.
The ultimate aim is to understand the problem that the software is required to solve
Fundamentally a human activity
Some common methods (some more effective than others):
Interviews
Questionnaires
Prototyping
Observation
Document analysis
© Muním Zabidi 29
Interviews Question Themes
Question Types:
© Muním Zabidi 30
Conducting Interviews
Benefits:
Interactive discussion with stakeholders.
The immediate follow-up to ensure the interviewer’s understanding.
Encourage participation and build relationships by establishing rapport with the stakeholder.
Drawbacks:
Time is required to plan and conduct interviews.
Commitment is required from all the participants.
Sometimes training is required to conduct effective interviews.
© Muním Zabidi 31
Survey/Questionnaires
A set of questions is given to stakeholders to quantify their thoughts.
After collecting the responses from stakeholders, data is analyzed to identify the area of
interest of stakeholders.
Open-Ended: Respondent is given the freedom to provide answers in their own words
rather than selecting from predefined responses.
Close Ended: It includes a predefined set of answers for all the questions and the
respondent has to choose from those answers. Questions can be multiple choice or can
be ranked from not important to very important.
Benefits:
Easy to get data from a large audience.
Less time is required for the participants to respond.
You can get more accurate information as compared to interviews.
Drawbacks:
All the Stakeholders might not participate in the surveys.
Questions may not be clear to all the participants.
Open-ended questions require more analysis.
© Muním Zabidi 32
Observation
The main objective is to understand the activity, task, tools used, and events performed
by others.
Active observation is to ask questions and try to attempt the work that other persons
are doing.
Passive observation is silent observation i.e. you sit with others and just observe how
they are doing their work without interpreting them.
Benefits:
The observer will get a practical insight into the work.
Improvement areas can be easily identified.
Drawbacks:
May make users nervous.
Users might change their way of working during observation and the observer might not get a
clear picture.
Knowledge-based activities cannot be observed.
© Muním Zabidi 33
Document Analysis
© Muním Zabidi 34
Prototyping
Prototypes model the working of a more complex system
Client can get an idea of the "look and feel" of the new system
Lo-fi prototypes check & test functionality
Hi-fi prototypes appear & function very close to the actual product
Benefits:
Gives a visual representation of the product.
Stakeholders can provide feedback early.
Drawbacks:
May become time-consuming if the system or process is highly complex
© Muním Zabidi 35
Software Requirements
Specification (SRS) Document
© Muním Zabidi 36
Software Requirements Specification (SRS)
© Muním Zabidi 37
Software Requirement Specification (SRS)
© Muním Zabidi 38
IEEE Software Engineering Standards
IEEE Computer Society has working groups and subcommittees on working on software
engineering standards
© Muním Zabidi 39
Model IEEE SRS
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definitions, Acronyms, and Abbreviations
1.4 References
1.5 Overview
2. Overall Description
2.1 Product Perspective
2.2 Product Functions
2.3 User Characteristics
2.4 General Constraints
2.5 Assumptions and Dependencies
3. Specific Requirements
© Muním Zabidi 40
Model Part 3 IEEE SRS
3. Specific Requirements
3.1 External Interface Requirements
3.1.1 User Interfaces
3.1.2 Hardware Interfaces
3.1.3 Software Interfaces
3.1.4 Communication Interfaces
3.2 Functional Requirements
3.2.1 Mode 1
3.2.1.1 Functional Requirement 1.1
:
3.2.1.3 Functional Requirement 1.n
3.2.m Mode m
3.2.m.1 Functional Requirement m.1
:
3.2.m.n Functional Requirement m.n
3.3 Performance Requirements
3.4 Design Constraints
3.5 Attributes
3.6 Other Requirements
© Muním Zabidi 41
Traditional Requirements
ID REQ001
Title Calculate the Area of a Rectangle
Description The system shall provide a function that calculates the area of a
rectangle based on its length and width.
Rationale The ability to calculate the area of a rectangle is a fundamental re-
quirement for any system that deals with geometric calculations.
Priority High
Dependencies None
Functional Requirements - The system shall accept input values for the length and width of
a rectangle.
- The system shall calculate the area of the rectangle using the
formula: area = length * width.
- The system shall display the calculated area on the screen.
Non-functional Requirements - The area calculation shall be accurate to at least two decimal
places.
- The area calculation function shall execute within 1 second for
rectangles with length and width values up to 100 units.
© Muním Zabidi 42
Traditional Requirements
ID REQ002
Title User Authentication
Description The system shall authenticate users before allowing ac-
cess to secure features.
Rationale Authentication is necessary to protect sensitive informa-
tion and prevent unauthorized access to secure features.
Priority Medium
Dependencies None
Functional Requirements - The system shall require users to provide a valid user-
name and password to access secure features.
- The system shall compare the provided username and
password with stored user credentials.
Non-functional Requirements - The user authentication process shall be completed
within 5 seconds to provide a responsive user experience.
© Muním Zabidi 43
Use Cases
© Muním Zabidi 45
What are Use Cases?
© Muním Zabidi 46
Why use Use Cases?
© Muním Zabidi 47
Use Case Deliverables
© Muním Zabidi 48
Use Case Diagrams
© Muním Zabidi 49
Use Case Diagram Elements Actor
Someone or something that interacts with the system causing it
to respond to business events
Actor represents a role.
Primary actor:
Something or someone that stimulates the system to react
Something we don’t have control over
Secondary actor:
Something or someone that responds to system requests
Something the system uses to get its job done
Represented in UML as a stickman, even when they are not
“people ” such as a bank.
© Muním Zabidi 51
Use Case Diagram Elements Boundary Box
© Muním Zabidi 52
Use Case Elements Basic Relationships
An association between an actor and a use case indicates that the actor and the use
case somehow interact or communicate with each other.
Illustrate relationships between an actor and a use case with a simple line
© Muním Zabidi 53
Use Case Elements Include and Extend Relationships
<<include>>
A use case diagram may also Pay by Validate
credit card PIN
show relationships between use
cases indicated by arrows: Customer
include, extend or generalization
include : one use case is needed
by another in order to perform a
task. Pay by
<<extend>>
Calculate
cash balance
extend : alternative options
under a certain use case Foreign
Customer
© Muním Zabidi 54
Use Case Elements Generalization Relationships
© Muním Zabidi 55
Summary: Advanced Use Cases
Base use case could Base use case is complete Base use case is incomplete
be abstract use case (concrete) by itself, defined (abstract use case).
(incomplete) or concrete independently.
(complete).
Specialized use case is Extending use case is Included use case required,
required, not optional, if optional, supplementary. not optional.
base use case is abstract.
© Muním Zabidi 56
Use Case Diagram for Film Camera
act = activity
class = class Actor Change film
cmp = component
dep = deployment
sd = interaction
pkg = package
stm = state machine
© Muním Zabidi 57
Use Case Diagram for Online Store
© Muním Zabidi 58
Use Case Diagram for ATM
© Muním Zabidi 59
Use Case Tips
Supplier
Collector
(in this case Collector=Supplier)
© Muním Zabidi 60
Writing Use Case Specifications
Jacobson et al. proposed a template for writing use cases as shown below [JSB11]:
Name Descriptive name that illustrates the purpose of the use-case.
Goal Describes the objective of the use case.
Actor List any actors that participate in the use-case.
Pre-condition Conditions that must be met before starting the use-case.
Post Condition Describe the state of the system after a use-case has run its
course.
Flow of events Description of interaction between the system and the actor.
1. Basic Flow – List the primary events that will occur when
this use case is executed.
2. Alternative Flows – Any additional events that may occur in
the use case should be listed separately. Each such
occurrence should be listed as an alternative flow. A use
case can have as many alternative flows as needed.
© Muním Zabidi 61
Flows in UC Specifications
Main flow
The most common sequence of user-system interactions to
reach the goal.
Example: customer pays bill by cash
Alternate flow
A alternative way to get to achieve the goal.
Example: customer pays bill by mail, by check, by credit card, by debit card, etc.
Exception flow
A path that does not lead to the goal.
Example: credit card is declined.
© Muním Zabidi 62
Use Case Specifications Example 1
© Muním Zabidi 63
Use Case Specifications Example 2
© Muním Zabidi 64
Use Case Specifications Example 3
Use Case ID UC3
Use Case Name Create Order
Description Create order is the ability to request the purchase of a product.
Actor Order Creator
Pre-Conditions Order Creator has been identified
Main flow
1. Order Creator selects ’order product’ action
2. System requests customer/product identification information
3. Order Creator provides customer/product identification information
4. System requests mailing information
5. Order Creator provides mailing information
6. System verifies mailing information
7. System requests order be submitted
8. Order creator submits order
9. System submits product order for processing
10. System confirms product order
© Muním Zabidi 65
Use Case Tips
© Muním Zabidi 66
User Stories
© Muním Zabidi 67
Traditional vs Agile Requirements
To understand the need for User Stories, we need to understand the difference between
requirements in traditional and agile methodologies.
Agile Requirements
Traditional Requirements
Agile requirements are intentionally
Traditional requirements are complete. incomplete.
Traditional requirements are fixed (or very Agile requirements emerge and triangulate
controlled). towards a solution.
Traditional requirements are written; signed Agile requirements are mostly verbal, with a
off before execution. little writing and are signed off after story
Traditional requirements are often measured completion.
by coverage, traceability and completeness. Agile requirements are iteratively measured by
the customer.
© Muním Zabidi 68
User Stories Why
© Muním Zabidi 69
User Stories What
A user story describes a software feature from the customer (user) perspective.
Uses informal, natural language description
Used in Agile software development
Traditionally recorded on index cards
© Muním Zabidi 70
3 C’s of User Stories [Jef01]
The topic of the backlog item. Details requirements are Acceptance tests confirm the
The high-level description of the discovered after the backlog completed backlog are what the
desired system behavior. item has been pulled into a sprint. customer wants.
https://www.justinmind.com/blog/user-story-examples/
User Stories -> Epic -> Theme
Set of
Wishlist Theme
related epics
© Muním Zabidi 74
Activity Diagrams
© Muním Zabidi 75
Activity Diagrams at a Glance
https://www.visual-paradigm.com/guide/
uml-unified-modeling-language/
Activity Diagram Elements
© Muním Zabidi 77
Basic Activity Diagram
View
book proposal
Tell account
[Accept proposal] Offer advance
cut check
Offer contract
to writer/agent
© Muním Zabidi 78
Activity Diagrams with Swimlanes
https://www.open.edu/openlearn/science-maths-technology/computing-ict/models-and-modelling/
content-section-7.1
Activity Diagrams with Swimlanes
Ticket Vending Machine Example
Activity is started by Commuter actor
who needs to buy a ticket. Ticket vending
machine will request trip information
from Commuter. This information will
include number and type of tickets, e.g.
whether it is a monthly pass, one way or
round ticket, route number, destination or
zone number, etc.
Based on the provided trip info ticket
vending machine will calculate payment
due and request payment options. Those
options include payment by cash, or by
credit or debit card. If payment by card
was selected by Commuter, another actor,
Bank will participate in the activity by
authorizing the payment.
References
© Muním Zabidi 82
References I
[CB94] Dai Clegg and Richard Barker, Case method fast-track: A RAD approach (computer
aided system engineering), Addison-Wesley, 1994.
[GC87] Robert B Grady and Deborah L Caswell, Software metrics: establishing a
company-wide program, Prentice-Hall, Inc., 1987.
[IEE20] IEEE, 2020 IEEE SA Standards Style Manual, 2020,
https://mentor.ieee.org/myproject/Public/mytools/draft/styleman.pdf .
[Jef01] Ron Jeffries, Essential XP: Card, Conversation, Confirmation, 2001,
https://ronjeffries.com/xprog/articles/expcardconversationconfirmation/ .
[JSB11] Ivar Jacobson, Ian Spence, and Kurt Bittner, Use Case 2.0, 2011, https:
//www.ivarjacobson.com/sites/default/files/field_iji_file/article/use-case_2_0_jan11.pdf .
[Mil03] Randy Miller, Practical UML: A hands-on introduction for developers, 2003,
https://edn.embarcadero.com/article/31863.
© Muním Zabidi 83
References II
[SJB15] John W. Satzinger, Robert B. Jackson, and Stephen D. Burd, Systems analysis and
design in a changing world, 7 ed., Course Technology, 2015.
[Wak03] Bill Wake, INVEST in Good Stories, and SMART Tasks, 2003,
https://xp123.com/articles/invest-in-good-stories-and-smart-tasks/ .
© Muním Zabidi 84