0% found this document useful (0 votes)
47 views20 pages

Unit-3 Software Metrices

The document discusses different types of software metrics used to measure various attributes of software products and processes. It describes direct and indirect measurement, need for software measurement, classification of metrics into product, process and project metrics, Halstead's software metrics, data structure metrics, design metrics, and object-oriented metrics. The key areas covered include size, complexity, quality, effort, and coupling metrics.

Uploaded by

Sunil Nagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views20 pages

Unit-3 Software Metrices

The document discusses different types of software metrics used to measure various attributes of software products and processes. It describes direct and indirect measurement, need for software measurement, classification of metrics into product, process and project metrics, Halstead's software metrics, data structure metrics, design metrics, and object-oriented metrics. The key areas covered include size, complexity, quality, effort, and coupling metrics.

Uploaded by

Sunil Nagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Software Metrics

Measurement and Metrics


• A measurement is a manifestation of the size, quantity, amount or
dimension of a particular attributes of a product or process.
Software measurement process is defined and governed by ISO
Standard.

• Need of Software Measurement:

Software is measured to:


1. Create the quality of the current product or process.
2. Anticipate future qualities of the product or process.
3. Enhance the quality of a product or process.
4. Regulate the state of the project in relation to budget and
schedule.
Classification of Software Measurement

• There are 2 types of software measurement:

1. Direct Measurement:
In direct measurement the product, process or thing is measured
directly using standard scale.

2. Indirect Measurement: In indirect measurement the quantity or


quality to be measured is measured using related parameter i.e. by use
of reference.
Metrics
Software metrics can be defined as “The
continuous application of measurement
based techniques to the software
development process and its products to
supply meaningful and timely
management information, together with the
use of those techniques to improve that
process and its products”.
Areas of Applications

•The most established area of software metrics is cost


and size estimation techniques.

•The prediction of quality levels for software, often in


terms of reliability, is another area where software
metrics have an important role to play.

•The use of software metrics to provide quantitative


checks on software design is also a well established
area.
Characteristics of Software Metrics
1. Quantitative
Metrics must possess quantitative nature. It means metrics can be expressed in
values.
2. Understandable
Metric computation should be easily understood ,the method of computing metric
should be clearly defined.
3. Applicability
Metrics should be applicable in the initial phases of development of the software.
4. Repeatable
The metric values should be same when measured repeatedly and consistent in
nature.
5. Economical
Computation of metric should be economical.
6. Language Independent
Metrics should not depend on any programming language.
Software Metrics
Categories of Metrics
i. Product metrics: describe the characteristics of the
product such as size, complexity, design features,
performance, efficiency, reliability, portability, etc.
ii. Process metrics: describe the effectiveness and
quality of the processes that produce the software
product. Examples are:
• effort required in the process
• time to produce the product
• effectiveness of defect removal during development
• number of defects found during testing
• maturity of the process
Software Metrics
ii. Project metrics: describe the project
characteristics and execution. Examples are :

• number of software developers

• staffing pattern over the life cycle of the software

• cost and schedule

• productivity
Halstead's Software Metrics

According to Halstead's "A computer program


is an implementation of an algorithm
considered to be a collection of tokens which
can be classified as either operators or
operand."
Software Metrics
Token Count
The size of the vocabulary of a program, which consists of the
number of unique tokens used to build a program is defined as:

η = η 1 + η2
η : vocabulary of a program
where
η1 : number of unique operators
η2 : number of unique operands
Software Metrics
The length of the program in the terms of the total number of tokens used
is

N = N1+N2
where
N : program length
N1 : total occurrences of operators
N2 : total occurrences of operands
Halstead metrics are:

• Program Volume (V)


The unit of measurement of volume is the standard unit
for size "bits." It is the actual size of a program if a
uniform binary encoding for the vocabulary is used.
        V=N*log2n
• Program Level (L)
The value of L ranges between zero and one, with L=1
representing a program written at the highest possible
level (i.e., with minimum size).
      L=V*/V
• Program Difficulty
The difficulty level or error-proneness (D) of the
program is proportional to the number of the
unique operator in the program.
      D= (n1/2) * (N2/n2)
• Programming Effort (E)
The unit of measurement of E is elementary
mental discriminations.
      E=V/L=D*V
• Estimated Program Length
According to Halstead, The first Hypothesis of
software science is that the length of a well-
structured program is a function only of the
number of unique operators and operands.
      N=N1+N2
Data Structure Metrics
The need for software development and other
activities are to process data.
• Some data is input to a system, program or
module;
• some data may be used internally,
• some data is the output from a system,
program, or module.
Data Structured Metrics
A count of this data structure is called Data
Structured Metrics. In these metrics
concentrations is on variables (and given
constant) within each module.
• The Amount of Data.
• The Usage of data within a Module.
• Program weakness.
• The sharing of Data among Modules.
Design Metric
• A design metric is a way to objectively evaluate
a design. Design metrics can be used to compare
and evaluate products and different concepts -
to assess the maturity of design and to define
the condition of a design - if it is good or bad.
• The metrics are aimed to assess design
information (concept sketches, product
specification, 3D CAD, 2D drawings) before they
are handed over to manufacturing. 
Object Oriented Metrics
Size Metrics:
• Number of Methods per Class (NOM)

• Number of Attributes per Class (NOA)

• Weighted Number Methods in a Class (WMC)


– Methods implemented within a class or the sum of the
complexities of all methods
Object Oriented
Metrics
Coupling Metrics:
• Response for a Class (RFC )
– Number of methods (internal and external) in a
class.

• Data Abstraction Coupling(DAC)


- Number of Abstract Data Types in a class.

• Coupling between Objects (CBO)


– Number of other classes to which it is coupled.
Object Oriented
Metrics
• Message Passing Coupling (MPC)
– Number of send statements defined in a class.

• Coupling Factor (CF)


– Ratio of actual number of coupling in the system to the
max. possible coupling.

You might also like