Unit 2 - 1
Unit 2 - 1
Chapter 2
REQUIREMENT ENGINEERING
Dr.Monica Sankat
SYLLABUS
• Requirements Engineering
• Establishing the Groundwork
• Eliciting Requirements
• Building the Requirements Model
• Requirements Analysis
• Metrics in the Process ... Project Domains
• Software Measurements
• Metrics for Software Quality
• Software Project Estimation
• Decomposition Techniques
• Empirical Estimation Models
• The Make/Buy Decision.
Requirements Engineering
• Requirements engineering (RE) refers to the process of defining,
documenting, and maintaining requirements in the engineering
design process.
• Requirement engineering provides the appropriate mechanism to
understand what the customer desires.
• Analyzing the need, and assessing feasibility, negotiating a
reasonable solution, specifying the solution clearly, validating the
specifications and managing the requirements as they are
transformed into a working system.
• Thus, requirement engineering is the disciplined application of
proven principles, methods, tools, and notation to describe a
proposed system's intended behavior and its associated
constraints.
• Requirements Engineering Process consists of the following main
activities, known as Requirement Engineering Process
Requirements Engineering
• It is a four-step process, which includes -
– Feasibility Study
– Requirement Elicitation and Analysis
– Software Requirement Specification
– Software Requirement Validation
– Software Requirement Management
• 1. Feasibility Study:
– To create the reasons for developing the software that is
acceptable to users, flexible to change and conformable to
established standards.
– Types of Feasibility
• Technical Feasibility - Evaluates the current technologies,
time and budget.
Requirements Engineering
Requirements Engineering
• Operational Feasibility - Assesses the range and series of
levels to solve business problems and customer
requirements.
• Economic Feasibility - Generate financial profits for an
organization.
• Feature Points
– Superset of function point measure that can be applied to
systems and engineering software applications.
– Used in those applications in which the algorithmic complexity
is high like real-time systems where time constraints are there,
embedded systems, etc.
– Computed by counting the information domain values and are
weighed by only single weight.
– Includes another measurement parameter-ALGORITHM.
Metrics in the Process ...
• Data Structure Metrics –
– Some data is input to a system, program or module; some data
may be used internally, and some data is the output from a
system, program, or module.
– Important set of metrics which capture in the amount of data
input, processed in an output form software. A count of this
data structure is called Data Structured Metrics.
– There are some Data Structure metrics to compute the effort
and time required to complete the project. There metrics are:
– 1. The Amount of Data: To measure the amount of Data, there
are further many different metrics, and these are:
• Number of variable (VARS)
• Number of Operands (η2) η2 = VARS + Constants + Labels
• Total number of occurrence of the variable (N2)
Metrics in the Process ...
– 2. The Usage of data within a Module
Level 4
Software Measurements
– Level 5: Optimizing - At this level, the measures from activities
are used to improve the process by removing and adding
process activities and changing the process structure
dynamically in response to measurement feedback. Thus, the
process change can affect the organization and the project as
well as the process.
• Identifying the Level of Maturity - Process maturity suggests to
measure only what is visible. Thus, the combination of process
maturity with GQM will provide most useful measures.
• At level 1, the project is likely to have -defined requirements. At this
level, the measurement of requirement characteristics is difficult.
• At level 2, the requirements are well-defined and the additional
information such as the type of each requirement and the number
of changes to each type can be collected.
• At level 3, intermediate activities are defined with entry and exit
criteria for each activity.
Metrics for Software Quality
• Software metrics can be classified into three categories −
– Product metrics
– Process metrics
– Project metrics
• Software quality metrics are a subset of software metrics that focus
on the quality aspects of the product, process, and project.
• Software Quality Metrics (SQMs) are essential management tools;
they are quantities that express information about a piece of
software or the process of development.
• Certain metrics measure the quality of code by analyzing its
complexity or ability to pass tests.
• Using software quality metrics is standard in software development
companies because metrics tell the company how the development
process is running and how it can be better.
Metrics for Software Quality
• Software quality metrics can be further divided into three
categories −
– Product quality metrics
– In-process quality metrics
– Maintenance quality metrics
• Product Quality Metrics - This metrics include the following –
– Mean Time to Failure
– Defect Density
– Customer Problems
– Customer Satisfaction
• Mean Time to Failure - It is the time between failures.
• Defect Density - It measures the defects relative to the
software size expressed as lines of code or function point, etc.
Metrics for Software Quality
• Customer Problems - It measures the problems that
customers encounter when using the product. The problems
metric is usually expressed in terms of Problems per User-
Month (PUM).
• PUM = Total Problems that customers reported for a time
period + Total number of license months of the software
during the period
Where, Number of license-month of the software = Number
of install license of the software × Number of months in the
calculation period
– Customer Satisfaction - Customer satisfaction is often measured
by customer survey data through the five-point scale −
• Very satisfied
• Satisfied
• Neutral
Metrics for Software Quality
• Dissatisfied
• Very dissatisfied
• Satisfaction with the overall quality of the product and its
specific dimensions is usually obtained through various
methods of customer surveys.
– Percent of completely satisfied customers
– Percent of satisfied customers
– Percent of dis-satisfied customers
– Percent of non-satisfied customers
• In-process Quality Metrics –
• In-process quality metrics deals with the tracking of defect arrival
during formal machine testing for some organizations. This metric
includes −
– Defect density during machine testing
Metrics for Software Quality
– Defect arrival pattern during machine testing
– Phase-based defect removal pattern
– Defect removal effectiveness
– Defect density during machine testing –
• Defect rate during formal machine testing is correlated with
the defect rate in the field.
• This simple metric of defects per KLOC or function point is a
good indicator of quality, while the software is still being
tested. It is especially useful to monitor subsequent releases
of a product in the same development organization.
– Defect arrival pattern during machine testing –
• The overall defect density during testing will provide only the
summary of the defects. The pattern of defect arrivals gives
more information about different quality levels in the field. It
includes the following −
Metrics for Software Quality
– The defect arrivals or defects reported during the testing
phase by time interval
– The pattern of valid defect arrivals when problem
determination is done on the reported problems.
– The pattern of defect backlog overtime. This metric is
needed because development organizations cannot
investigate and fix all the reported problems immediately.
– Phase-based defect removal pattern –
• This is an extension of the defect density metric during
testing. In addition to testing.
• It tracks the defects at all phases of the development cycle,
including the design reviews, code inspections, and formal
verifications before testing.
Metrics for Software Quality
• Because a large percentage of programming defects is related
to design problems, conducting formal reviews, or functional
verifications to enhance the defect removal capability of the
process at the front-end reduces error in the software.
– Defect removal effectiveness –
• It can be defined as follows −
• $$DRE = \frac{Defect \: removed \: during \: a \:
development\:phase } {Defects\: latent \: in \: the\:
product} \times 100\%$$
• This metric can be calculated for the entire development
process, for the front-end before code integration and for
each phase.
• It is called early defect removal when used for the front-end
and phase effectiveness for specific phases.
Metrics for Software Quality
• Maintenance Quality Metrics –
• Following are the fixes that can be carried out to eliminate the
defects as soon as possible with excellent fix quality.
– Fix backlog and backlog management index
– Fix response time and fix responsiveness
– Percent delinquent fixes
– Fix quality
– Fix backlog and backlog management index –
• Fix backlog is related to the rate of defect arrivals and the rate
at which fixes for reported problems become available.
• It is a simple count of reported problems that remain at the
end of each month or each week.
• Backlog Management Index (BMI) is used to manage the
backlog of open and unresolved problems
Metrics for Software Quality
• $$BMI = \frac{Number \: of \: problems \: closed \:
during \:the \:month }{Number \: of \: problems \: arrived \:
during \:the \:month} \times 100\%$$
• If BMI is larger than 100, it means the backlog is reduced. If
BMI is less than 100, then the backlog increased.
– Fix response time and fix responsiveness –
• The fix response time metric is usually calculated as the mean
time of all problems from open to close. Short fix response
time leads to customer satisfaction.
• The important elements of fix responsiveness are customer
expectations, the agreed-to fix time, and the ability to meet
one's commitment to the customer.
– Percent delinquent fixes –It is calculated as follows −
• $Percent \:Delinquent\: Fixes =$
Metrics for Software Quality
• $\frac{Number \: of \: fixes \: that\: exceeded \:
the \:response \:time\:criteria\:by\:ceverity\:level}{Number \:
of \: fixes \: delivered \: in \:a \:specified \:time} \times 100\%
$
– Fix Quality –
• Fix quality or the number of defective fixes is another
important quality metric for the maintenance phase.
• A fix is defective if it did not fix the reported problem, or if it
fixed the original problem but injected a new defect.
• A defective fix can be recorded in two ways:
• Record it in the month it was discovered or record it in the
month the fix was delivered.
– The first is a customer measure;
– The second is a process measure.
Software Project Estimation
• Estimation of the size of the software is an essential part of
Software Project Management. Various measures are used in
project size estimation. Some of these are:
– Lines of Code
– Number of entities in ER diagram
– Total number of processes in detailed data flow diagram
– Function points
• 1. Lines of Code (LOC): As the name suggests, LOC count the total
number of lines of source code in a project. The units of LOC are:
– KLOC- Thousand lines of code
– NLOC- Non-comment lines of code
– KDSI- Thousands of delivered source instruction
• The size is estimated by comparing it with the existing systems of
the same kind.
Software Project Estimation
• The experts use it to predict the required size of various
components of software and then add them to get the total size.
• Two separate source files having a similar number of lines may not
require the same effort. A file with complicated logic would take
longer to create than one with simple logic.
• Proper estimation may not be attainable based on LOC. The length
of time it takes to solve an issue is measured in LOC.
• Advantages:
– Universally accepted and is used in many models like COCOMO.
– Estimation is closer to the developer’s perspective.
– Simple to use.
• Disadvantages:
– Different programming languages contain a different number of
lines.
Software Project Estimation
– No proper industry standard exists for this technique.
– It is difficult to estimate the size using this technique in the
early stages of the project.
• 2. Number of entities in ER diagram:
• ER model provides a static view of the project. It describes the
entities and their relationships.
• The number of entities in ER model can be used to measure the
estimation of the size of the project. The number of entities
depends on the size of the project.
• Advantages:
– Size estimation can be done during the initial stages of
planning.
– The number of entities is independent of the programming
technologies used.
Software Project Estimation
• Disadvantages:
– No fixed standards exist.
– Just like FPA, it is less used in the cost estimation model. Hence,
it must be converted to LOC.
• 3. Total number of processes in detailed data flow diagram:
• Data Flow Diagram(DFD) represents the functional view of
software. The model depicts the main processes/functions
involved in software and the flow of data between them.
• Utilization of the number of functions in DFD to predict software
size. Sum of the estimated size of each process gives the final
estimated size.
• Advantages:
– It is independent of the programming language.
– Each major process can be decomposed into smaller processes.
This will increase the accuracy of estimation
Software Project Estimation
• Disadvantages:
– Studying similar kinds of processes to estimate size takes
additional time and effort.
– All software projects are not required for the construction of
DFD.
• 4. Function Point Analysis:
• In this method, the number and type of functions supported by the
software are utilized to find FPC(function point count). The steps in
function point analysis are:
– Count the number of functions of each proposed type.
– Compute the Unadjusted Function Points(UFP).
– Find Total Degree of Influence(TDI).
– Compute Value Adjustment Factor(VAF).
– Find the Function Point Count(FPC).