Unit 1 Part2
Unit 1 Part2
REQUIREMENT
ENGINEERING
INTRODUCTION
Topics:
Functional and non-functional requirements, user requirements, system requirements,
interface specification, the software requirements document. Requirements engineering
process: Feasibility studies, requirements elicitation and analysis, requirements validation,
requirements management. Software project effort and cost estimation – COCOMO model I,
COCOMO Model II, LOC, Function point metrics.
What is Requirement?
In the software development process, requirement phase is the first software engineering activity.
This phase is a user-dominated phase and translates the ideas or views into a requirements
document.
It is a statement describing either
❑ In either case it must contribute in some way to what the proposed system must do,or a constraint wards adequately solving
❑ the set of requirements as a whole represents a negotiated agreement among the stakeholders.
4
What are Requirements?
User requirements
• Statements in natural language plus diagrams of the services the system provides and its operational
constraints. Written for customers. provides and its operational constraints.
System requirements
• A structured document setting out detailed descriptions of the system’s functions, services and
operational constraints. Defines what should be implemented so may be part of a contract between client
and contractor.
7
Types of System Requirements
• Software Requirements are mainly classified into three types:
• Functional requirements
• Non-functional requirements
• Domain requirements
Functional Requirements
12
3. Domain Requirements
1. Feasibility Study
2. Requirement Elicitation and Analysis
3. Software Requirement Specification
4. Software Requirement Validation
5. Software Requirement Management
Feasibility Study
• The objective behind the feasibility study is to create the reasons for
developing the software that is acceptable to users, flexible to change
and conformable to established standards.
Types of Feasibility
1.Technical Feasibility - Technical feasibility evaluates the current technologies, which
are needed to accomplish customer requirements within the time and budget.
2.Operational Feasibility - Operational feasibility assesses the range in which the
required software performs a series of levels to solve business problems and customer
requirements.
3.Economic Feasibility - Economic feasibility decides whether the necessary software
can generate financial profits for an organization.
Requirement Elicitation and Analysis
❑ This is also known as the gathering of requirements. Here,
requirements are identified with the help of customers and existing
systems processes, if available.
Focus groups and Collecting multiple Some quantitative but Highlights areas of consensus Possibility of dominant
workshops viewpoints mostly qualitative data and conflict. Encourages characters
contact between developers
and users
Naturalistic observation Understanding context of Qualitative Observing actual work gives Very time consuming. Huge
user activity insight that other techniques amounts of data
cannot give
Studying documentation Learning about procedures, Quantitative No time commitment from Day-to-day work will differ
regulations, and standards users required from documented
procedures
[1] Preece, Rogers, and Sharp “Interaction Design: Beyond human-computer interaction”, p214
18
Software Requirement Specification
• Software requirement specification is a kind of document which is created by a software
analyst after the requirements collected from the various sources - the requirement received by
the customer written in ordinary language. It is the job of the analyst to write the requirement
in technical language so that they can be understood and beneficial by the development team.
• The models used at this stage include ER diagrams, data flow diagrams (DFDs), function
decomposition diagrams (FDDs), data dictionaries, etc.
• Data Flow Diagrams: Data Flow Diagrams (DFDs) are used widely for modeling the
requirements. DFD shows the flow of data through a system. The system may be a company,
an organization, a set of procedures, a computer hardware system, a software system, or any
combination of the preceding. The DFD is also known as a data flow graph or bubble chart.
• Data Dictionaries: Data Dictionaries are simply repositories to store information about all
data items defined in DFDs. At the requirements stage, the data dictionary should at least
define customer data items, to ensure that the customer and developers use the same definition
and terminologies.
• Entity-Relationship Diagrams: Another tool for requirement specification is the
entity-relationship diagram, often called an "E-R diagram." It is a detailed logical
representation of the data for the organization and uses three main constructs i.e. data entities,
relationships, and their associated attributes.
What is a Software Requirements Specification document?
Table of Contents
Software Requirements Specification (SRS) Document for
Online Shopping System
• Introduction 1.1 Purpose The purpose of this document is to outline the
requirements for developing an Online Shopping System that allows users to
browse products, place orders, and manage their shopping activities online.
• 1.2 Scope The system will provide a user-friendly interface for customers to
search, view, and purchase products. It will also include an admin interface for
managing products, orders, and customer information. The system will support
multiple payment methods and ensure secure transactions.
• 1.3 Definitions, Acronyms, and Abbreviations
• SRS: Software Requirements Specification
• Admin: System Administrator
• User: Customer using the system
• 1.4 References
• IEEE Standard for Software Requirements Specifications
• 1.5 Overview This document is structured to describe the functional and
non-functional requirements of the Online Shopping System.
• General Description
• 2.1 Product Functions
• User Registration and Authentication
• Product Search and Viewing
• Shopping Cart Management
• Order Placement and Payment
• Order Tracking
• Admin Product and Order Management
• 2.2 User Characteristics
• Customers: General users with basic computer literacy
• Admins: Users with higher access levels to manage the system
• 2.3 Operating Environment
• Web-based application accessible via standard web browsers
• Compatible with desktop and mobile devices
• 2.4 Design and Implementation Constraints
• Compliance with security standards (SSL(Secure Socket layer) encryption,
secure payment gateways)
• Scalability to handle a large number of users and transactions
• 2.5 Assumptions and Dependencies
• Reliable internet connection for users
• Availability of third-party payment gateways
• Specific Requirements
• 3.1 Functional Requirements
• 3.1.1 User Registration and Login
• Users can register using their email and password
• Users can log in securely
• 3.1.2 Product Search and Viewing
• Users can search products by name, category, and price
• Users can view detailed product information
• 3.1.3 Shopping Cart
• Users can add/remove products to/from the cart
• Users can view the cart and proceed to checkout
• 3.1.4 Order Processing
• Users can place orders and choose payment methods
• Users receive order confirmation and tracking information
• 3.1.5 Admin Management
• Admins can add, update, and delete products
• Admins can view and manage customer orders
• 3.2 Non-Functional Requirements
• 3.2.1 Performance Requirements
• System should handle up to 1000 concurrent users
• 3.2.2 Security Requirements
• User data must be encrypted
• Secure authentication mechanisms
• 3.2.3 Usability Requirements
• Intuitive and user-friendly interface
• 3.2.4 Reliability Requirements
• System uptime of 99.9%
• 3.3 External Interface Requirements
• 3.3.1 User Interfaces
• Web interface for users and admins
• 3.3.2 Hardware Interfaces
• Compatible with standard hardware devices (PC, mobile)
• 3.3.3 Software Interfaces
• Integration with payment gateways
• Database for storing user, product, and order information
4. Appendices
• List of supported payment methods
Software Requirement Validation
• After requirement specifications developed, the requirements discussed in this document are
validated. The user might demand illegal, impossible solution or experts may misinterpret the
needs. Requirements can be the check against the following conditions.
• If they can practically implement
• If they are correct and as per the functionality and specially of software
• If there are any ambiguities
• If they are full
• If they can describe
• Requirements Validation Techniques
• Requirements reviews/inspections: systematic manual analysis of the requirements.
• Prototyping: Using an executable model of the system to check requirements.
• Test-case generation: Developing tests for requirements to check testability.
• Automated consistency analysis: checking for the consistency of structured requirements
descriptions.
Software Requirement Management
• Function points are derived using an empirical relationship based on countable (direct) measures of
software’s information domain and qualitative assessments of software complexity.
• The function point (FP) metric can be used effectively as a means for measuring the functionality delivered
by a system.
• Using historical data, the FP metric can then be used to – a) estimate the cost or effort required to design,
code and test the software, b) predict the number of errors that will be encountered during testing, c)
forecast the number of components and/or the number of projected source lines in the implemented
system.
Software Project Effort and Cost Estimation
Function count type for effort estimate (function point analysis technique)
Statement Functional
of decomposition
Scope
Perform a
Grammatical “parse”
38
Software Project Effort and Cost Estimation - Techniques
Conventional Methods – LOC/FP Approach
• Compute LOC/FP using estimates of information domain values
• Use historical data to build estimates for the project
• Example – LOC Approach
Framework activities
41
Software Project Effort and Cost Estimation - Techniques
Process Based Estimation - Example
Project Characteristics
Calibration Factors
LOC/FP data
43
Software Project Effort and Cost Estimation - Techniques
Estimation with Use Cases
44
Software Project Effort and Cost Estimation -
Problems
• Estimated LOC count is 56,100 . Assuming that your organization produces 450
LOC/pm with a burdened labor rate of $7000 per person-month, find the cost
/LOC, total estimated project cost and estimated effort in person months.
To Compute:
• Cost per LOC = Labor rate per month/LOC per pm
• Total Estimated Project Cost = Estimated LOC * Cost per LOC
• Estimated Effort in pm = Total Estimated Project Cost/ Labor rate per month
45
COCOMO I
• The constructive cost model was developed by Barry W. Boehm in the late
1970s and published in Boehm's 1981 as a model for estimating effort, cost and
schedule for software projects.
• Basic model - It estimates the software in a rough and quick manner.
• Mostly used in small and medium sized projects.
• 3 modes of development:
a) Organic,
b) Semi Detached,
c) Embedded
46
COCOMO - I
• Equation & Example
47
COCOMO I
Numerical
• Suppose a project was estimated to be 400 KLOC. Calculate effort and time for
organic mode.
• Organic:
Effort = a (KLOC)b
Effort = 2.4 (400)1.05
Effort = 1295PM
Development Time = c (Effort)d
Development Time = 2.5 (1295)0.38
Development Time = 38 Months, Find Effort Staff Size, Productivity??
• Semi-detached:
Effort = a (KLOC)b
Effort = 3.0 (400)1.12
Person Months = 2462PM, Find Development Time, Effort Staff Size,
Productivity??
• Embedded:
Effort = a (KLOC)b
Effort = 3.6 (400)1.20
Person Months = 4772PM , Find Development Time , Effort Staff Size,
Productivity??
48
COCOMO II
• Barry Boehm introduced a hierarchy of software estimation models bearing the
name COCOMO, for Constructive Cost Model.
• The original COCOMO model became one of the most widely used and discussed
software cost estimation models in the industry.
• It has evolved into a more comprehensive estimation model, called COCOMO II.
• Like its predecessor, COCOMO II is actually a hierarchy of estimation models that
address the following areas:
• Application composition model: Used during the early stages of software engineering, when
prototyping of user interfaces, consideration of software and system interaction, assessment of
performance, and evaluation of technology maturity are paramount.
• Early design stage model: Used once requirements have been stabilized and basic software
architecture has been established.
• Post-architecture-stage model: Used during the construction of the software.
• Like all estimation models for software, the COCOMO II models require sizing
information.
• Three different sizing options are available as part of the model hierarchy: object
points, function points and lines of source code.
51
COCOMO II
• The COCOMO II application composition model uses object points and is
illustrated below.
• It should be noted that other, more sophisticated estimation models (using FP
and KLOC) are also available as part of COCOMO II.
53
COCOMO II
• The figure above presents the productivity rate,
PROD = NOP / person-month, for different levels of developer experience and
development environment maturity.
• Once the productivity rate has been determined, an estimate of project effort is
computing using,
Estimated effort = NOP / PROD
• In more advanced COCOMO II models (these models use FP and KLOC counts of
the size variable), a variety of scale factors, cost drivers, and adjustment
procedures are required.
54
COCOMO II - Problems
• Use the COCOMO II model to estimate the effort required to build software for
a simple ATM that produces 12 screens, 10 reports, and will require
approximately 80 software components, Percentage of reuse is 20%, Value of
Prod=9. Use the application composition model with object points.
To Compute:
• Object points = screen + report + components
• NOP = Object Points * [(100 - % reuse)/100]
• Estimated Effort = NOP/PROD
55