You are on page 1of 49

SOFTWARE SYSTEM QUALITY

LECTURE # 4

METRICS & MEASUREMENT- I

27th November, 2021 Dr. Ali Javed


Contact Information
2

q Instructor: Dr. Ali Javed


Associate Professor
Department of Computer Science
U.E.T Taxila

¤ Website: http://fms.uettaxila.edu.pk/Profile/ali.javed
¤ Email: ali.javed@uettaxila.edu.pk
¤ Contact No: +92-51-9047747
¤ Office hours:
n Monday, 09:00 - 11:00, Office # 7 S.E.D

Dr. Ali Javed


Course Information
3

q Course Name: Software System Quality

q Course Code: SE-5001

Dr. Ali Javed


4 Metrics & Measurement
ü Metric vs Measurement
ü The 4 P’s of Measurement
ü Product Metrics
ü LOC
ü Function Points

Dr. Ali Javed


Measure vs Metric
5

q Measure - quantitative indication of extent, amount, dimension, capacity, or


size of some attribute of a product or process.
ü E.g., Number of errors

q Metric - quantitative measure of degree to which a system, component or


process possesses a given attribute.
ü E.g., Number of errors found per person hours expended

Dr. Ali Javed


6 The 4 Ps of Software Measurement

With regards to software, we can measure:


ü Product
ü Process
ü People
ü Project

Dr. Ali Javed


Measuring the Product
7

q Product refers to the actual software system,


documentation and other deliverables

q We examine the product and measure a number of


aspects:
ü Size
ü Functionality offered
ü Cost
ü Various Quality Attributes

Dr. Ali Javed


Measuring the Process
8

q Involves analysis of the way a product is developed

q What lifecycle do we use?

q What deliverables are produced?

q How are they analysed?

q How can the process help to produce products faster?

q How can the process help to produce better products?

Dr. Ali Javed


Measuring the People
9

q Involves analysis of the people


developing a product

q How fast do they work?

q How much bugs do they produce?

q How many sick-days do they take?

q Very controversial. People do not like


being turned into numbers.
Dr. Ali Javed
10 Product Metrics

ü Size metrics
ü Defects-based metrics
ü Cost-metrics
ü Time metrics
ü Quality Attribute metrics

Dr. Ali Javed


Size Metrics
11

q Size of the software produced

q LOC - Lines Of Code

q KLOC - 1000 Lines Of Code

q Some Common Metrics:


ü Defects/KLOC, Cost/LOC, Documentation Pages/KLOC

q Knowing the size of a system is important for comparing


different systems together
Dr. Ali Javed
LOC Metrics
12

q Easy to use

q Easy to compute

q Language & programmer dependent

Dr. Ali Javed


The problems with LOC (1/3)
13

q Same system developed with different programming


languages will give different LOC readings

Video Rental
System

FoxPro Pascal Assembly


2 KLOC 5 KLOC 15 KLOC

Dr. Ali Javed


The problems with LOC (2/3)
14

q Same system developed by different developers using the


same language will give different LOC readings

Video Rental
System

Developer A Developer B Developer C


2 KLOC 1.2 KLOC 2.5 KLOC

Dr. Ali Javed


The problems with LOC (3/3)
15

q To calculate LOC, you must wait until the system


is implemented

q This is not adequate when management


requires prediction of cost and effort

q A different approach is sometimes necessary…

Dr. Ali Javed


Function Points [1]
16

q Instead of measuring size, function points measure the


functionality offered by a system.

q Invented by Albrecht at IBM in 1979, still use today:


http://www.ifpug.org

q A Function can be defined as a collection of executable


statements that performs a certain task

q Function points can be calculated before a system is


developed

q They are language and developer independent

Dr. Ali Javed


Function Points
17

q There are two types of functions


ü Data Functions
ü Transaction Functions

q Data Functions
ü Internal Logic Files
ü External Interface Files

q Transaction Functions
ü External Inputs
ü External Outputs
ü External Inquiries

Dr. Ali Javed


Function Points
18

q Transaction Functions
ü External Inputs: External Input (EI) is a transaction function in which Data goes “into” the application from
outside the boundary. This data is coming external to the application. Data may come from a data input
screen or another application. The data may be used to maintain one or more internal logical files. Eis
can add, change and delete information in the file.

ü External Outputs: External Output (EO) is a transaction function in which data comes “out” of the system.
The data creates reports or output files sent to other applications. These reports and files are created
from information contained in one or more internal logical files and external interface files. Formatted
data sent out of application with added value (e.g calculated totals).

ü External Inquiries: External Inquiry (EQ) is a transaction function with both input and output components
that result in data retrieval from one or more internal logical files and external interface files. Formatted
data sent out of application without added value. A screen full of customer address information would be
an example of an EQ.

Dr. Ali Javed


Function Points
19

q Data Functions

ü Internal Logic Files: Internal Logical File (ILF) is a user identifiable group of logically related
data or control information that resides entirely within the application boundary. An ILF has
the inherent meaning that it is internally maintained, it has some logical structure, and it is
stored in a file. (Employee file)

ü External Interface Files: are responsible for exchanging data with other systems e.g files
accessed by the application but not maintained by it. EIFs can contain business data, control
data and rules-based data. E.g. An example of Business data is customer names, addresses,
phone number, etc.

Dr. Ali Javed


Function Point Analysis Steps

q Step 1 − Determine the type of count.


q Step 2 − Determine the boundary of the count.
q Step 3 − Identify each Elementary Process (EP) required by the user.
q Step 4 − Determine the unique EPs.
q Step 5 − Measure data functions.
q Step 6 − Measure transactional functions.
q Step 7 − Calculate functional size (unadjusted function point count).
q Step 8 − Determine Value Adjustment Factor (VAF).
q Step 9 − Calculate adjusted function point count.

Dr. Ali Javed


Function Point Analysis Steps
1. Type of count: The very first step of this process is to determine the
type of function count. There are 3 types of function point (FP) count.

q Development Project FP Count: This measures the functions that are


directly involved in the development of the final system. This would include
all the phases of the project from requirements gathering to the first
installation.

q Enhancement Project FP Count: This measures the functions involved in the


modifications brought in the system. That is the changes made to the system
after production.

q Application FP count: This measures the functions involved in the final


deliverable excluding the effort of already existing functions that may have
existed.

Dr. Ali Javed


Function Point Analysis Steps
Step 2. Scope and Boundary of the Count: In the second step, the
scope and boundary of the functions are identified.
Boundary indicates the border between the application being
measured and the external applications.
Scope can be decided with the help of reports and files.

Step 3: Identify Each Elementary Process Required by the User


q Compose and/or decompose the functional user requirements into
the smallest unit of activity, which constitutes a complete transaction.
q For example, the Functional User Requirement − “Maintain Employee
information” can be decomposed into smaller activities such as add
employee, change employee, delete employee, and inquire about
employee.
q Each unit of activity thus identified is an Elementary Process (EP).

Dr. Ali Javed


Function Point Analysis Steps
Step 4: Determine the Unique Elementary Processes
q Comparing two EPs already identified, count them as one EP (same EP) if they −

q Require the same set of DETs.

q Require the same set of FTRs.

q Require the same set of processing logic to complete the EP. For e.g if you have
identified ‘Add Employee’ as an EP, it should not be divided into two EPs to account
for the fact that an employee may or may not have dependents. The EP is still ‘Add
Employee’, and there is variation in the processing logic and DETs to account for
dependents.

Step 5: Measure Data Functions


q Classify each data function as either an ILF or an EIF.

q Count the DETs for Each Data Function

Ø A DET is a unique user recognizable, non-recursive (non-repetitive) field. DET can


be quantitative (e.g ID) or qualitative (e.g pic, sound, etc.).
q Count the RETs for Each Data Function

Ø A RET is user recognizable sub group of data elements within an ILF or an EIF.

Dr. Ali Javed


Function Point Analysis Steps
Step 5: Measure Data Functions
q Determine the functional complexity of each data

function

Data Element Types (DETs)


RETS
1-19 20-50 >50
1 L L A
2 to 5 L A H
>5 A H H

Functional Complexity: L = Low; A = Average; H = High

Dr. Ali Javed


Function Point Analysis Steps
Step 5: Measure Data Functions
q Measure the Functional Size for Each Data Function

Functional Complexity FP Count for ILF FP Count for EIF

Low 7 5

Average 10 7

High 15 10

Dr. Ali Javed


Function Point Analysis Steps
Step 6: Measure Transactional Functions
q Classify each Transactional Function
ü Transactional functions should be classified as an External Input, External Output
or an External Inquiry.
q Count the DETs for Each Transactional Function
q Count the FTRs for Each Transactional Function
q Determine the functional complexity of each transaction function.
Data Element Types (DETs)
FTRs
1-4 5-15 >=16
0-1 L L A
2 L A H
>=3 A H H
Dr. Ali Javed Functional Complexity: L = Low; A = Average; H = High
Function Point Analysis Steps
Step 6: Measure Transactional Functions
q Measure the Functional Size for Each EI

Complexity FP Count
Low 3
Average 4
High 6

q Measure the Functional Size for Each EO/EQ


Complexity FP Count for EO FP Count for EQ
Low 4 3
Average 5 4
High 6 6
Dr. Ali Javed
Function Point Analysis Steps
Step 7: Calculate Functional Size (Unadjusted Function
Point Count)
q Unadjusted FP Count can be computed as:

q FP Count (ILFs) x weights + FP Count (EIFs) x weights +


FP Count (EIs) x weights + FP Count (EOs) x weights +
FP Count (EQs) x weights

Dr. Ali Javed


Function Point Analysis Steps
q Step 8: Determine the Value Adjustment Factor

q The Value Adjustment Factor (VAF) is based on 14 GSCs that rate the
general functionality of the application being counted. Each characteristic
has associated descriptions to determine the degree of influence.

q Reasoning: Original Function Points do not address certain functionality


which systems can offer E.g. Distributed functionality, performance
optimisation, etc

q The GSC extension involves answering 14 questions about the system and
modifying the original function point count accordingly

Dr. Ali Javed


The GSC Function Points Extension
8. On-line update
9. Complex Processing
10. Reusability
11. Installation ease
12. Operational Ease
13. Multiple sites
14. Facilitation of Change

Dr. Ali Javed


Degrees of Influence
ü 0 Not present, or no influence
ü 1 Incidental influence
ü 2 Moderate influence
ü 3 Average influence
ü 4 Significant influence
ü 5 Strong influence throughout

Dr. Ali Javed


The GSC Function Points Extension
q The analyst/software engineer assigns a value between 0 and 5 to each question

q Determine the degree of influence for each of the 14 GSCs.

q The sum of the values of the 14 GSCs thus obtained is termed as Total Degree of
Influence (TDI).

q TDI = ∑14 Degrees of Influence

q Next, calculate Value Adjustment Factor (VAF) as


14
q VAF = (TDI × 0.01) + 0.65 VAF = 0.65 + 0.01å Ci
i =1

Dr. Ali Javed


Function Point Analysis Steps
Step 9: Calculate Adjusted Function Point Count

q Adjusted FP Count = Unadjusted FP Count × VAF


q

Dr. Ali Javed


34
Function Points- Employee Tracking
Example

Dr. Ali Javed


Function Points- Employee Tracking
35
Example
q Employee tracking system (ETS) is a basic employee attendance system planned to
serve small to medium-sized businesses employing 10–100 employees. The system is
planned to have interfaces to the company’s other software packages: Human-Master,
which serves human resources units, and Wage-Master, which serves the wages units.
ETS is planned to produce several reports and online queries.

Dr. Ali Javed


Function Points- Employee Tracking
36
Example
q In step 1 of function point analysis it determines the following components
ü EI: External Inputs
ü EO: External Outputs
ü EQ: External Queries
ü ILF: Internal Log Files
ü ELF: External Log Files

q Analysis of the software system as presented in the DFD summarizes the


number of the various components:
ü Number of user inputs (EI) – 2
ü Number of user outputs (EO) – 3
ü Number of user online queries (EQ) – 3
ü Number of logical files (ILF) – 2
ü Number of external interfaces (ELF) – 2.

Dr. Ali Javed


Function Points- Employee Tracking
37
Example
q The degree of complexity (simple, average or complex) was evaluated
for each component.

q In step 2 compute the unadjusted function point (UFP) which rate each
component as low, average, or high. For transactions (EI, EO, and EQ), the
rating is based on the FTR (File type reference:: The number of files
updated or referenced) and DET (Data element types:: the number of
user-recognizable fields).

q Based on this Table, an EI that references 2 files and 10 user recognizable fields
would be ranked as Average.
FTR’s DET’s
1-5 6-15 >15
0-1 Low Low Average
2-3 Low Average High
>3 Average High High
Dr. Ali Javed
Function Points- Employee Tracking
38
Example
q For files (ILF and ELF), the rating is based on the RET (Record element
type:: the number of user recognizable data elements in an ILF or ELF)
and DET (Data element type:: The number of user-recognizable fields).

q Based on this Table, an ILF that contains 10 data elements, and 5 user
recognizable fields would be ranked as Average.

RET’s DET’s
1-5 6-15 >15
0-1 Low Low Average
2-5 Low Average High
>5 Average High High

Dr. Ali Javed


Function Points- Employee Tracking
39
Example
q Convert ratings into Unadjusted Function Points (UFPs)

Ratings Values
EO EQ EI ILF ELF
Low 4 3 3 7 5
Average 5 4 4 10 7
High 6 5 6 15 10

Dr. Ali Javed


Function Points- Employee Tracking
40
Example
q Unadjusted Function Points (UFPs) Computation
Sw System
Components
Complexity Level Total
Simple/Low Average Complex/High UFP
Count Weight Points Count Weight Points Count Weight Points
Factor Factor Factor
A B C=A*B D E F=D*E G H I=G*H
EI 1 3 3 --- 4 --- 1 6 6 9
EO --- 4 --- 2 5 10 1 7 7 17
EQ 1 3 3 1 4 4 1 6 6 13
ILF 1 7 7 --- 10 --- 1 15 15 22
ELF --- 5 --- --- 7 --- 2 10 20 20
Total 81
UFP

Dr. Ali Javed


Function Points- Employee Tracking
41
Example
q In step 8 of function point analysis Compute Value Adjustment Factor
(VAF) based on 14 general system characteristics (GSC). Weight each
GSC on a scale of 0 to 5 based on whether it has no influence to strong
influence.

Dr. Ali Javed


Function Points- Employee Tracking
42
Example

Dr. Ali Javed


Function Points Example
43

q In step 4 compute the Function point as follows:

q VAF=sum (GSC)

q FP = UFP * (0.65 + (VAF* .01))

q FP= 81*(0.65+(41*.01))=85.86

ü GSC-General System Characteristics


ü FP – Function Point
ü VAF - Value Adjustment Factor
ü UFP-Unadjusted Function Point

Dr. Ali Javed


Function Point Analysis
A simple example:

inputs
3 simple X 2 = 6
4 average X 4 = 16
1 complex X 6 = 6
outputs
6 average X 5 = 30
2 complex X 7 = 14
files
5 complex X 15 = 75
inquiries
8 average X 4 = 32
interfaces
3 average X 7 = 21
4 complex X 10 = 40
Unadjusted function points 240

Dr. Ali Javed


Function Point Analysis
Continuing our example . . .

q Complex internal processing = 3

q Code to be reusable = 2

q High performance = 4

q Multiple sites = 3

q Distributed processing = 5

Project adjustment factor = 17

Dr. Ali Javed


Function Point Analysis

q Adjustment calculation:

Adjusted FP = Unadjusted FP X [0.65 + (adjustment factor X 0.01)]


= 240 X [0.65 + ( 17 X 0.01)]
= 240 X [0.82]
= 197 Adjusted function points

Dr. Ali Javed


Function Point Analysis
But how long will the project take and how much will it cost?

q As previously measured, programmers in ABC organization average 18


function points per month. Thus . . .

197 FP divided by 18 = 11 man-months

q If the average programmer is paid $5,200 per month (including benefits),


then the [labor] cost of the project will be . . .

11 man-months X $5,200 = $57,200

Dr. Ali Javed


References
48

1. http://groups.engin.umd.umich.edu/CIS/course.des/cis525/js/f00/artan/function
points.htm

Dr. Ali Javed


For any query Feel Free to ask
49

Dr. Ali Javed

You might also like