. .
Estimation of project metrics




After completing this experiment you will be able to:

  • Categorize projects using COCOMO, and estimate effort and development time required for a a project
  • How to use Halstead's metrics to estimate effort


Time Required


Around 3.00 hours


Project Estimation Techniques


Estimation of various project parameters is a basic project planning activity. The important project parameters that are estimated include:

  • Project size: What will be problem complexity in terms of the effort and time required to develop the product?
  • Cost: How much is it going to cost to develop the project?
  • Duration: How long is it going to take to complete development?
  • Effort: How much effort would be required?


Here we will discuss about two estimation methods: COCOMO and Halstead's metrics.




COCOMO (Constructive Cost Estimation Model) was proposed by Boehm. According to him, any software development project can be classified into one of the following three categories based on the development complexity: organic, semidetached, and embedded. The classification is done considering the characteristics of the product as well as those of the development team and development environment. Usually these three product classes correspond to application, utility and system programs, respectively. Data processing programs are normally considered to be application programs. Compilers, linkers, etc., are utility programs. Operating systems and real-time system programs, etc. are system programs.

The definition of organic, semidetached, and embedded systems are elaborated below.

  •  Organic: A development project can be considered of organic type, if the project deals with developing a well understood application program, the size of the development team is reasonably small, and the team members are experienced in developing similar types of projects.
  • Semidetached: A development project can be considered of semidetached type, if the development consists of a mixture of experienced and inexperienced staff. Team members may have limited experience on related systems but may be unfamiliar with some aspects of the system being developed.
  • Embedded: A development project is considered to be of embedded type, if the software being developed is strongly coupled to complex hardware, or if the stringent regulations on the operational procedures exist.
    According to Boehm, software cost estimation should be done through three stages: Basic COCOMO, Intermediate COCOMO, and Complete COCOMO.


Basic COCOMO Model

The basic COCOMO model gives an approximate estimate of the project parameters. The basic COCOMO estimation model is given by the following expressions:
Effort = a * (KLOC)b PM
Tdev = 2.5 * (Effort)c Months


  • KLOC is the estimated size of the software product expressed in Kilo Lines of Code
  • a, b, c are constants for each category of software products
  • Tdev is the estimated time to develop the software, expressed in months
  • Effort is the total effort required to develop the software product, expressed in person months (PMs)

The effort estimation is expressed in units of person-months (PM).


 The value of the constants a, b, c are given below:



Software project a b c
Organic 2.4 1.05 0.38
Semi-detached 3.0 1.12 0.35
Embedded 3.6 1.20 0.32


Intermediate COCOMO Model


The basic COCOMO model assumes that effort and development time are functions of the product size alone. However, many other project parameters apart from the product size affect the development effort and time required for the product. Therefore, in order to obtain an accurate estimation of the effort and project duration, the effect of all relevant parameters must be taken into account.


The intermediate COCOMO model recognizes this fact and refines the initial estimate obtained using the basic COCOMO expressions by using a set of 15 cost drivers (multipliers) based on various attributes of software development. For example, if modern programming practices are used, the initial estimates are scaled downward by multiplication with a cost driver having a value less than 1.


Each of the 15 attributes receives a rating on a six-point scale that ranges from "very low" to "extra high" (in importance or value) as shown below. An effort multiplier from the table below [i] applies to the rating. The product of all effort multipliers results in an Effort Adjustment Factor (EAF).



Cost Drivers Ratings
Very Low Low Nominal High Very High Extra High
Product attributes
Required software reliability 0.75 0.88 1.00 1.15 1.40  
Size of application database   0.94 1.00 1.08 1.16  
Complexity of the product 0.70 0.85 1.00 1.15 1.30 1.65
Hardware attributes
Run-time performance constraints     1.00 1.11 1.30 1.66
Memory constraints     1.00 1.06 1.21 1.56
Volatility of the virtual machine environment   0.87 1.00 1.15 1.30  
Required turnabout time   0.87 1.00 1.07 1.15  
Personnel attributes
Analyst capability 1.46 1.19 1.00 0.86 0.71  
Applications experience 1.29 1.13 1.00 0.91 0.82  
Software engineer capability 1.42 1.17 1.00 0.86 0.70  
Virtual machine experience 1.21 1.10 1.00 0.90    
Programming language experience 1.14 1.07 1.00 0.95    
Project attributes
Application of software engineering methods 1.24 1.10 1.00 0.91 0.82  
Use of software tools 1.24 1.10 1.00 0.91 0.83  
Required development schedule 1.23 1.08 1.00 1.04 1.10


EAF is used to refine the estimates obtained by basic COCOMO as follows:

Effort|corrected = Effort * EAF

Tdev|corrected = 2.5 * (Effort|corrected) c


Complete COCOMO Model


Both the basic and intermediate COCOMO models consider a software product as a single homogeneous entity. However, most large systems are made up several smaller sub-systems, each of them in turn could be of organic type, some semidetached, or embedded. The complete COCOMO model takes into account these differences in characteristics of the subsystems and estimates the effort and development time as the sum of the estimates for the individual subsystems. This approach reduces the percentage of error in the final estimate.


The following development project can be considered as an example application of the complete COCOMO model. A distributed Management Information System (MIS) product for an organization having offices at several places across the country can have the following sub-components:


  • Database part
  • Graphical User Interface (GUI) part
  • Communication part


Of these, the communication part can be considered as embedded software. The database part could be semi-detached software, and the GUI part organic software. The costs for these three components can be estimated separately, and summed up to give the overall cost of the system.


Halstead's Complexity Metrics


A computer program is nothing but a collection of operands and operators. Operands are usually the implementation variables or constants. Operators are usually the symbols that affects the value of operands. Halstead's metrics are computed based on the operators and operands used in a computer program. For a given program it defines the following four parameters:


  • n1: Number of unique operators used in the program
  • n2: Number of unique operands used in teh program
  • N1: Total number of operators used in the program
  • N2: Total number of operands used in the program

Using the above parameters we compute the following metrics:


  •  Program Length: N = N1 + N2
  •  Program Vocabulary: n = n1 + n2
  • Volume: V = N * lg n
  • Difficulty: D = (n1 * N2) / (2 * n2)
  • Effort: E = D * V


The program volume V is the minimum number of bits needed to encode the program. It represents the size of the program while taking into account the programming language.
The difficulty metric indicates how difficult a program is to write or understand.

Cite this Simulator:

..... .....
Copyright @ 2017 Under the NME ICT initiative of MHRD (Licensing Terms)
 Powered by AmritaVirtual Lab Collaborative Platform [ Ver 00.11. ]