COC2073 - Module 3 (Software Requirements Engineering)
COC2073 - Module 3 (Software Requirements Engineering)
COC2073
Module 2 – Software Requirements
Engineering
Muhammad Shahid
Department of Computer Science
National Textile University
[email protected]
Last Lecture Review
▪ Software Process
▪ The Waterfall Model
▪ Prototyping Model
▪ The V Model
▪ Phased Development
▪ Spiral Model
▪ Agile Software Development
▪ Extreme Programming (XP)
▪ Scrum
2 Software Engineering Fundamentals - COC2073
Agenda – What will you Learn Today?
Software Requirement Levels of Software
Engineering Requirements
Requirements Requirements
Engineering Process Validation Techniques
▪ Example:
When the user enters the degrees in
Fahrenheit, the system shall calculate and
write the degrees in Celsius
200%
150%
100%
50%
0%
Software Requirement
Business
Requirements
User
Requirements
Functional
Requirements
Non-Functional
Requirements
▪ E-commerce Website
▪ E-commerce Website
– Customers must be able to create an account
using their email address and a password
– Users should be able to filter products by
categories, price range, and customer ratings
– Customers must receive an email confirmation
after placing an order
– Users should be able to track the status of their
orders from their account dashboard
▪ E-commerce Website
– The system must allow users to search for
products using keywords, categories, and filters
– The system must enable users to add products to
a shopping cart and proceed to checkout
– The system must support multiple payment
methods (credit card, PayPal, etc.)
– The system must generate and email a
confirmation receipt after a purchase is completed
Portability Modifiability
Maintainability
Scalability
Reliability
Availability Performance
Safety Usability
Testability
▪ Performance
– Specifies how fast the system should respond and
operate
▪ Scalability
– Defines how well the system can handle growth in
terms of users, data, or transactions
▪ Availability
– Refers to the system’s ability to remain operational
and accessible over time
▪ Security
– Addresses how the system protects data and
prevents unauthorized access
▪ Usability
– Focuses on how easy the system is to use and
navigate
▪ Reliability
– Ensures the system performs consistently under
specific conditions
▪ Maintainability
– Specifies how easy it is to update, fix, or enhance
the system
▪ Compliance
– Ensures the system follows industry regulations or
standards
▪ Capacity
– Specifies the volume of data the system can
process and store
▪ E-commerce Website
– Performance: The website must load product
pages within 3 seconds, even during peak hours
– Security: All transactions must be encrypted using
SSL/TLS, and the website must comply with PCI-
DSS standards for payment security
– Scalability: The website must handle 50,000
simultaneous users during sales events without
crashing
– Availability: The website must be available 24/7
with 99.95% uptime
34 Software Engineering Fundamentals- COC2073
Non-Functional Requirements: Examples
User Specific needs and What the user needs Users must be able to
Requirements expectations of the from the system to track their orders
end-users perform tasks online
Functional Specific features or What the system should The system must allow
Requirements functions the system do users to create accounts
must provide and log in
Non-Functional System qualities like How the system should The system must load
Requirements performance, security, perform pages within 3 seconds
and usability
Modifiable
Feasibility Elicitation
Study and Analysis
Validation Specification
Customer
User Development
Pays for Organization
the system
Provides the
Uses the system system
Stakeholders
Requirements
Discovery
Requirements
Requirements
Classification and
Specification
Organization
Requirements
Prioritization and
Negotiation
a) Interviewing
Requirements
Requirements
b) Scenarios Specification
Classification and
Organization
Requirements
Discovery
Requirements
Requirements
Classification and
Specification
Organization
Requirements
Prioritization and
Negotiation
Requirements
Requirements
Classification and
Specification
Organization
Requirements
Prioritization and
Negotiation
Purpose:
▪ Understand the true needs of the customer
▪ Trace future implementation to needs
Sources: Techniques:
▪ Goals ▪ Interviews
▪ Domain knowledge ▪ Scenarios
▪ Prototypes
▪ Stakeholders
▪ Facilitated meetings
▪ Environment ▪ Observation
58 Software Engineering Fundamentals - COC2073
Requirements Elicitation - Interviewing
5. Dependency
1. Actor
4. Association 6. Generalization
▪ System:
- Sets the boundary of the system in relation to
the actors who use it (outside the system) and
the features it must provide (inside the system)
▪ Actor:
- A role played by a person, system, or device
that has a stake in the successful operation of
the system
▪ Use Case:
- Identifies a key feature of the system. Each Use
Case expresses a goal that the system must
achieve
▪ Association:
- Identifies an interaction between actors and Use
Cases
▪ Dependency:
- Identifies a communication relationship between
two Use Cases
▪ Generalization:
- Defines a relationship between two actors or two
Use Cases where one Use Case inherits
OR
<<actor>> <<actor>>
HR System Satellite Feed
Manager
Customer
Customer
Withdraw Cash
Download Books
Customer
Regular Premium
Customer Customer
Add Record
View
Record
Edit Record
Nurse Doctor
Setup
Consultation
Add Record
View
Record
Edit Record
Nurse Doctor
Setup
Consultation
Reserve
Library System
Borrow
Browse
Borrow
Book
Browser
Book
Return
Borrower
Books
Extend
Loan
Update
Catalog
Librarian
79
Library
Software Management
Engineering Fundamentals System
- COC2073
Task - 1 (Stereotypes)
Library System
Extend
Loan
Check for
Reservation
Book
Borrower Borrow
Copy of
Book
Refuse
Loan
80
Library
Software Management
Engineering Fundamentals System
- COC2073
Task - 2
Course Registration System
Register
Course
<<include>>
Student
Registration
Confirm Clerk
Prerequisite
Finance
Office Pay Fee
Make
Appointment
Produce
Schedule
Patient
Management
Manage Update
Schedule Schedule
Doctor
82 Patient Appointment
Software Engineering Fundamentals -System
COC2073
Components of a Use-Case
Delete Employee
Implementation Priority 3
Actors User
Summary Deleting employee allows the user to permanently
remove employee from the system. Deleting employee is
only possible when the employee has not been used in
the system.
Precondition Employee’s information was previously saved to the
system and a user needs to permanently delete the
Employee’s information.
Post-Condition The Employee’s information is no longer available
anywhere in the system.
Extend
85 None
Software Engineering Fundamentals - COC2073
Elaborated Use-Cases
Record
Delete Transaction
Employee Cancel
User Deletion
Delete Employee
Uses Record Transactions, Cancel Action
Normal Course of ▪ The use case starts when the user wants to delete an
Events Employee
▪ The user selects the Employee and directs the system
to delete the information - Exception 1, 2
▪ The system responds by asking the user to confirm
deletion
▪ The user confirms deletion
Alternative Path The user does not confirm Deletion
▪ If the user does not confirm deletion, the information
does not delete.
▪ Uses: Cancel Action
86 Software Engineering Fundamentals - COC2073
Elaborated Use-Cases
Record
Delete Transaction
Employee Cancel
User Deletion
Delete Employee
Exception The system will not allow a user to delete information that
is being used in the system.
The system will not allow a user to delete another user
that has subordinates.
Assumption ▪ Deleting employee covers a permanent deletion of an
entire set of data.
▪ Deleted employee is not retained in the system.
▪ A user can only delete employee that has not been
used in the system.
2. Association
3. Conditions
4. Constraints
Initial Node
▪ The filled circle is the starting point of the
diagram
Final Node
▪ The filled circle with a boarder is the ending
point
▪ An activity diagram can have zero or more
activity final state
Activity
▪ The rounded rectangle represents activities
that occur
▪ An activity is not necessarily a program, it
may be a manual thing also
Flow / Edge
▪ The arrows in the diagram
▪ No label is necessary
Fork
▪ A black bar(horizontal/vertical) with one flow
going into it and several leaving it
▪ This denotes the beginning of parallel
activities
Fork Fork
Join
▪ A black bar with several flows entering it and
one leaving it
▪ This denotes the end of parallel activities
Fork
Fork
Merge
▪ A diamond with several flows entering and
one leaving
▪ The implication is that all incoming flow to
reach this point until processing continues
Decision
▪ A diamond with one flow entering and several
leaving
▪ The flow leaving includes conditions as yes/
no state
Condition?
Swimlane
▪ A partition in activity diagram by means of
dashed line, called swim lane
▪ This swim lane may be horizontal or vertical
Swimlane 1 Swimlane 2
Step 3
Post-condition
Confirm No
deletion?
Yes
Object Deleted
Open Incident
Achieve Incident
Create File
Save File
Already
Get email ID exists?
No
No
Assign room
Create customer
record
Generate
invoice
Search
item No Yes
Search
Yes More
Found? View item shop?
Choice? No
Browse
Add to cart
Browse
item
View cart
Address
information
Process
External
Agent
Graded Work
Submit Work Mark
Assignments Student Grades
Hours Work
Calculate Gross Gross Pay
Pay Rate Pay
Accepted Inventory
Order Order Change
Verify Order Assemble Order
▪ Decision Making
– Order Management System
▪ Change information
– Summarize data
– Filter data
– Sort data
▪ Triggering Processes
- Processes that trigger other processes
- Processes execution on a certain event
2.1
Hours Worked Calculate Pay Rate
Gross Pay
D1 Students
Account Employer
Transactions
Withdraw
Pay
funds from
Bill
an Account
Bank Creditor
Vital signs
Patient
Request for
Patient
Report
Monitoring
System
Report
Nurse Warning Message
Request for
Report Log data
Report Patient Logs
Generator
Produce Format
Date time
Warning Clock Patient
Message Data
Warning Formatted
messages patient data
Patient Doctor
A process is
needed to
Patient exchange data Doctor
between
external agents
Patient Data
Source
A process is
needed to Data
Patient update a data Source
store
Data Data
Source Source
A process is
Data needed to
copy data from Data
Source Source
one data store
to another
CUSTOMER
KITCHEN
Customer Order
Food Ordering Food Order
Receipt System Prepared Food
Management
Reports
RESTAURANT
MANAGER
CUSTOMER
KITCHEN
Customer Order
Food Ordering Food Order
Receipt System Prepared Food
Store Management
Data Reports
RESTAURANT
Inventory MANAGER
Goods Inventory
D2 D1
Sold File Produce File
Management
Reports Daily Inventory Depletion Amounts
Daily Goods Sold Amount
RESTAURANT
Management Reports
MANAGER
▪ Condition
‒ Condition describe the conditions or factors that
will affect the decision or policy
‒ They are listed in the upper section of the
decision table
▪ Action
‒ Action describe, in the form of statements, the
possible policy actions or decisions
‒ They are listed in the lower section of the
decision table
▪ Rules
‒ Rules describe which actions are to be taken
under a specific combination of conditions
‒ They are specified by first inserting different
combinations of condition attribute values and
then putting X's in the appropriate columns of
the action section of the table
Decision Rules
Condition Rule 1 Rule 2 Rule 3 Rule 4 Rule 5
Action
Decision Rules
Rule 1 Rule 2 Rule 3 Rule 4
C1 Y Y Y Y
C2 Y N N N
C3 N N N N
A1 X
A2 X
A3 X X
Requirement Number
Condition R1 R2 R3 R4 R5
User is authorized F T T T T
Chemical is available -- F T T T
Chemical is hazardous -- -- F T T
User is trained -- -- -- F T
Action
Accept request X X
Reject request X X X
Down
Left Right
No No
Reject Accept
request request
Yes
Authorized? Hazardous? Yes Accept
request
Yes Yes
Available? Trained?
No No Reject
Reject
request request
No No
Reject Accept
request request
Yes
Authorized? Hazardous? Yes Accept
request
Yes Yes
Available? Trained?
No No Reject
Reject
request request
No No
Reject Accept
request request
Yes
Authorized? Hazardous? Yes Accept
request
Yes Yes
Available? Trained?
No No Reject
Reject
request request
Decision Tables
OR
Decision Trees???
Decision Rules
R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12
Gender M F M F M F M F M F M F
City Y Y N N Y Y N N Y Y N N
Age A A A A B B B B C C C C
Decision Rules
R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12
Gender M F M F M F M F M F M F
City Y Y N N Y Y N N Y Y N N
Age A A A A B B B B C C C C
Action
W X X X
X X X
Y X
Z X X X X X X X X X X
Modifiable
Elicitation Analysis
Validation Specification
Requirements Requirements
Walkthroughs
Review Inspection
Test-Case
Reading Prototyping
Generation
Models to check
Interviews functions and Scenarios
relationships
▪ Requirements Review
- Requirements Review is a formal process of
requirement validation
- Performed by group of people
- Review plan is prepared in which
o Review team is selected
o Time & place of meeting is decided
- The review team checks the SRS for
completeness and consistency
- Feedback of individual team member
▪ Requirements Inspection
- Similar to review
- Effective way for detect defect at early stages
- Defects are detected and corrected
▪ Requirements Inspection
▪ Walkthroughs
- In this approach, one of the document’s author
presents the requirements to the rest of the
stakeholders and ask for feedback
- Walkthroughs work best when there are a large
numbers of varied stakeholders
▪ Test-Case Generation
- Ensures that requirements are good enough for
the product and planning activities
- It removes defects before a project starts and
during the project execution and development
- The product manager and tester select and review
the high priority requirements
- Black box test cases are created for the
requirements for inspection
▪ Reading
- Reader applies knowledge to find the defects
- There are various reading techniques
a) Ad-Hoc Based Reading
- Documents are given to reviewers without any
guidelines
- Detection of defects are based on experience and
knowledge of reviewer
b) Checklist Based Reading
- Set of questions is given to the reviewer as a checklist
- Covers the quality characteristics of requirements
▪ Prototyping
- It is used to understand, analyze and validate the
requirements
- In this approach, an executable model of the
system is demonstrated to end- users and
customers
- Developed in incremental manner
- In each increment defects are identified and
discussed with stockholders and corrective
actions are taken
1. Horizontal Prototypes
2. Vertical Prototypes
3. Throwaway Prototypes
4. Evolutionary Prototypes
feedback feedback
feedback
Activity sequence from use cases to user interface design using a throwaway
prototype
Construct and
verify product
Deliver product