Skip to content

Latest commit

 

History

History
138 lines (98 loc) · 3.64 KB

File metadata and controls

138 lines (98 loc) · 3.64 KB

Experiment 10: Estimation of Project Metrics

← Back to Index


Aim

To estimate software project metrics using LOC, Function Point (FP), and the COCOMO model.


Theory

1. Lines of Code (LOC)

The simplest size metric — counts the number of source code lines (excluding comments/blank lines).

  • Advantage: Easy to measure
  • Limitation: Language-dependent; doesn't reflect complexity or quality

2. Function Points (FP)

Measures software functionality delivered to the user, independent of programming language.

Five Function Types:

Component Simple Average Complex
External Inputs (EI) 3 4 6
External Outputs (EO) 4 5 7
External Inquiries (EQ) 3 4 6
Internal Logical Files (ILF) 7 10 15
External Interface Files (EIF) 5 7 10

UFP = Σ (Count × Weight) AFP = UFP × VAF (Value Adjustment Factor, typically 0.65–1.35)

3. COCOMO Model (Boehm, 1981)

Basic COCOMO Formulas:

Metric Formula
Effort (Person-Months) E = a × (KLOC)^b
Duration (Months) D = 2.5 × (E)^0.38
Team Size S = E / D

COCOMO Modes:

Mode Type of Project a b
Organic Small, familiar, simple 2.4 1.05
Semi-detached Medium, mixed experience 3.0 1.12
Embedded Complex, tight constraints 3.6 1.20

Procedure

  1. Define the scope of the software project.
  2. LOC Estimation: List all modules and estimate lines per module; sum and convert to KLOC (÷ 1000).
  3. Function Point: Count inputs, outputs, inquiries, ILF, EIF.
  4. Assign complexity weights (Simple/Average/Complex) to each component.
  5. Calculate UFP = Sum of (Count × Weight).
  6. Apply VAF to get Adjusted FP (AFP).
  7. COCOMO: Identify project type (Organic/Semi-detached/Embedded).
  8. Calculate Effort (Person-Months) = a × (KLOC)^b.
  9. Calculate Duration (Months) = 2.5 × (Effort)^0.38.
  10. Calculate Team Size = Effort / Duration.

Example

Project: Student Management System

Step 1: LOC Estimation

Module Estimated LOC
Login / Authentication 500
Student Records Management 2,000
Report Generation 1,500
Admin Panel 3,000
Notification System 1,000
Total 8,000 LOC = 8 KLOC

Step 2: COCOMO Estimation (Organic Mode)

Given: KLOC = 8, Mode = Organic (a = 2.4, b = 1.05)

Effort  = 2.4 × (8)^1.05
        = 2.4 × 9.43
        ≈ 22.6 Person-Months

Duration = 2.5 × (22.6)^0.38
         = 2.5 × 3.58
         ≈ 8.95 ≈ 9 Months

Team Size = 22.6 / 9 ≈ 3 People

COCOMO Summary Table

Metric Value
Project Size 8 KLOC
COCOMO Mode Organic
Estimated Effort 22.6 Person-Months
Development Duration ~9 Months
Team Size ~3 People

Step 3: Function Point Estimation

Component Count Weight (Avg) FP Score
External Inputs (EI) 5 4 20
External Outputs (EO) 3 5 15
External Inquiries (EQ) 4 4 16
Internal Logical Files (ILF) 2 10 20
External Interface Files (EIF) 0 7 0
UFP 71
VAF = 1.0 (neutral)
AFP = UFP × VAF = 71 × 1.0 = 71 Function Points

Effort Comparison

Technique Estimate
COCOMO (LOC-based) 22.6 Person-Months
Function Point (FP-based, at 8 PM/100 FP) ~5.7 Person-Months

Note: FP-based productivity rate varies by organization.