0% found this document useful (0 votes)
43 views44 pages

Software Metrics ch7

The document outlines the Constructive Cost Model (COCOMO) for measuring software development cost and effort, detailing its three modes: Organic, Semidetached, and Embedded. It provides equations for estimating effort and development time based on project size and complexity, along with examples and coefficients for each mode. Additionally, it discusses intermediate and detailed models, cost drivers, and their impact on project estimates.

Uploaded by

miki
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)
43 views44 pages

Software Metrics ch7

The document outlines the Constructive Cost Model (COCOMO) for measuring software development cost and effort, detailing its three modes: Organic, Semidetached, and Embedded. It provides equations for estimating effort and development time based on project size and complexity, along with examples and coefficients for each mode. Additionally, it discusses intermediate and detailed models, cost drivers, and their impact on project estimates.

Uploaded by

miki
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

Measuring Cost and effort

Outline

• COCOMO Model
• Types of COCOMO
Model
• COCOMO – II
Measuring Cost and Effort

The Constructive Cost Model (COCOMO)


Constructive Cost model
(COCOMO)

Basic Intermediate Detailed

Model proposed by
B. W. Boehm’s
through his book
Software Engineering
Measuring Cost and Effort

COCOMO applied to

Semidetached
Organic mode Embedded
mode mode
Measuring Cost and Effort
Mode Project size Nature of Project Innovation Deadline of Development
the project Environment

Organic Typically Small size project, experienced Little Not tight Familiar & In
developers in the familiar house
2-50 KLOC
environment. For example, pay
roll, inventory projects etc.

Semi Typically Medium size project, Medium Medium Medium Medium


detached size team, Average previous
50-300 KLOC experience on similar project.
For example: Utility systems
like compilers, database
systems, editors etc.

Embedded Typically over Large project, Real time Significant Tight Complex
systems, Complex interfaces, Hardware/
300 KLOC Very little previous experience. customer
For example: ATMs, Air Traffic Interfaces
Control etc. required

Table 4: The comparison of three COCOMO modes


Measuring Cost and Effort
Basic Model

Basic COCOMO model takes the form

bb
E  ab (KLOC)
db
D  cb (E)
where E is effort applied in Person-Months, and D is the development time in
months. The coefficients ab, bb, cb and db are given in table 4 (a).
Measuring Cost and Effort

Software ab bb cb db
Project

Organic 2.4 1.05 2.5 0.38

Semidetached 3.0 1.12 2.5 0.35

Embedded 3.6 1.20 2.5 0.32

Table 4(a): Basic COCOMO coefficients


Measuring Cost and Effort

When effort and development time are known, the average staff size to complete
the project may be calculated as:

Average staff size E


(SS)  D
Persons
When project size is known, the productivity level may be calculated as:

Productivity KLOC
(P)  E KLOC / PM
Measuring Cost and Effort
Example:

Suppose that a project was estimated to be 400 KLOC.


Calculate the effort and development time for embedded
mode.
Measuring Cost and Effort
Solution

The basic COCOMO equation take the form:

E  ab (KLOC) bb
db
D  cb (KLOC)
Estimated size of the project = 400 KLOC

Embedded mode

E = 3.6(400)1.20 = 4772.8 PM
D = 2.5(4772.8)0.32 = 38 M
Measuring Cost and Effort
Example:

A project size of 200 KLOC is to be developed. Software


development team has average experience on similar type
of projects. The project schedule is not very tight. Calculate
the effort, development time, average staff size and
productivity of the project.
Measuring Cost and Effort
Solution

The semi-detached mode is the most appropriate mode; keeping in view the size,
schedule and experience of the development team.

Hence E = 3.0(200)1.12 = 1133.12 PM


D = 2.5(1133.12)0.35 = 29 M

Average staff size E


(SS)  D
Persons
1133 . 12
𝑥= =39 𝑝𝑒𝑟𝑠𝑜𝑛𝑠
29
Measuring Cost and Effort

Productivity KLOC  0.1765 KLOC /


 E 1133.12 PM
200

P  176.5 LOC /
PM
Measuring Cost and Effort
Intermediate Model
Cost drivers
(i) Product Attributes
 Required s/w reliability

 Size of application database

 Complexity of the product

(ii) Hardware Attributes

 Run time performance constraints

 Memory constraints

 Virtual machine volatility

 Turnaround time
Measuring Cost and Effort
(iii) Personal Attributes
 Analyst capability

 Programmer capability

 Application experience

 Virtual m/c experience

Programming language

(iv) experience Project Attributes


 Modern programming practices

 Use of software tools


 Required development Schedule
Measuring Cost and Effort
Multipliers of different cost drivers
Cost Drivers RATINGS
Very low Low Nominal High Very Extra
high high
Product Attributes

RELY 0.75 0.88 1.00 1.15 1.40 --


DATA -- 0.94 1.00 1.08 1.16 --
CPLX 0.70 0.85 1.00 1.15 1.30 1.65
Computer Attributes

TIME -- -- 1.00 1.11 1.30 1.66


STOR -- -- 1.00 1.06 1.21 1.56

VIRT -- 0.87 1.00 1.15 1.30 --

TURN -- 0.87 1.00 1.07 1.15 ---


Measuring Cost and Effort
Cost Drivers RATINGS
Very low Low Nominal High Very Extra
high high
Personnel Attributes

ACAP 1.00 0.86 0.71 --


1.46 1.19
AEXP --
1.29 1.13 1.00 0.91 0.82
PCAP 0.86 0.70 --
1.42 1.17 1.00
VEXP 1.00 0.90 -- --
1.21 1.10
LEXP --
1.14 1.07 1.00 0.95 --
Project Attributes

MODP --
1.24 1.10 1.00 0.91 0.82
TOOL 1.24 1.10 1.00 0.91 0.83 --
SCED
1.23 1.08 1.00 1.04 1.10 --

Table 5: Multiplier values for effort calculations


Measuring Cost and Effort
Intermediate COCOMO equations

bi
E  ai *
(KLOC)
c (E) d i EAF: EAF
Effort Adjustment Factor
i
its value is in a range of 0.9-1.14
D
Project ai bi ci di

Organic 3.2 1.05 2.5 0.38

Semidetached 3.0 1.12 2.5 0.35

Embedded 2.8 1.20 2.5 0.32

Table 6: Coefficients for intermediate COCOMO


Measuring Cost and Effort
Detailed COCOMO Model
Detailed COCOMO

Phase-Sensitive Three level


effort multipliers product hierarchy

Cost Modules
drivers design subsystem
System level
& test
Manpower allocation for
each phase
Measuring Cost and Effort

Development Phase
Plan / Requirements
EFFORT : 6% to 8%
DEVELOPMENT TIME : 10% to 40%
% depend on mode & size
Measuring Cost and Effort

Design
Effort : 16% to 18%
Time : 19% to 38%

Programming
Effort : 48% to 68%
Time : 24% to 64%

Integration & Test


Effort : 16% to
34%

Time : 18% to
34%
Measuring Cost and Effort
Principle of the effort estimate
Size equivalent

As the software might be partly developed from software already existing (that is,
re-usable code), a full development is not always required. In such cases, the parts
of design document (DD%), code (C%) and integration (I%) to be modified are
estimated. Then, an adjustment factor, A, is calculated by means of the following
equation.
A = 0.4 DD + 0.3 C + 0.3 I

The size equivalent is obtained by

S (equivalent) = (S x A) / 100

Ep 
 p E Dp
Measuring Cost and Effort
Lifecycle Phase Values of 
Mode & Code Plan & System
p Detailed Module Integration
Size Requirements Design Design Code & Test & Test

Organic Small
0.06 0.16 0.26 0.42 0.16
S≈2
Organic
0.06 0.16 0.24 0.38 0.22
medium S≈32
Semidetached
0.07 0.17 0.25 0.33 0.25
medium S≈32
Semidetached
0.07 0.17 0.24 0.31 0.28
large S≈128
Embedded
0.08 0.18 0.25 0.26 0.31
large S≈128
Embedded
extra large 0.08 0.18 0.24 0.24 0.34
S≈320

Table 7 : Effort and schedule fractions occurring in each phase of


the lifecycle
Measuring Cost and Effort
Lifecycle Phase Values of p
Mode & Code Plan & System Detailed Module Code Integration
Size Requirements Design Design & Test & Test

Organic Small
0.10 0.19 0.24 0.39 0.18
S≈2
Organic
0.12 0.19 0.21 0.34 0.26
medium S≈32
Semidetached
0.20 0.26 0.21 0.27 0.26
medium S≈32
Semidetached
0.22 0.27 0.19 0.25 0.29
large S≈128
Embedded
0.36 0.36 0.18 0.18 0.28
large S≈128
Embedded
extra large 0.40 0.38 0.16 0.16 0.30
S≈320

Table 7 : Effort and schedule fractions occurring in each phase of


the lifecycle
Measuring Cost and Effort
Distribution of software life cycle:

1. Requirement and product design


(a) Plans and requirements
(b) System design

2. Detailed Design
(a) Detailed design

3. Code & Unit test


(a) Module code & test

4. Integrate and Test


(a) Integrate & Test
Measuring Cost and Effort
Example:
A new project with estimated 400 KLOC embedded system has to
be developed. Project manager has a choice of hiring from two
pools of developers: Very highly capable with very little experience
in the programming language being used
Or
Developers of low quality but a lot of experience with the
programming language. What is the impact of hiring all developers
from one or the other pool ?
Measuring Cost and Effort
Solution
This is the case of embedded mode and model is intermediate
COCOMO.
di
Hence E  ai
(KLOC)
= 2.8 (400)1.20 = 3712 PM

Case I: Developers are very highly capable with very little experience
in the programming being used.

EAF = 0.82 x 1.14 = 0.9348


E = 3712 x .9348 = 3470 PM
D = 2.5 (3470)0.32 = 33.9 M
Measuring Cost and Effort
Case II: Developers are of low quality but lot of experience with the
programming language being used.

EAF = 1.29 x 0.95 = 1.22


E = 3712 x 1.22 = 4528 PM
D = 2.5 (4528)0.32 = 36.9 M

Case II requires more effort and time. Hence, low quality developers
with lot of programming language experience could not match with
the performance of very highly capable developers with very litter
experience.
Measuring Cost and Effort
Example: 4.8
Consider a project to develop a full screen editor. The
major
components identified are:
I. Screen edit
II. Command Language Interpreter
III. File Input & Output
IV. Cursor Movement
V. Screen Movement
The size of these are estimated to be 4k, 2k, 1k, 2k and
3k delivered source code lines. Use COCOMO to determine
1. Overall cost and schedule estimates (assume values for
different cost drivers, with at least three of them being
different from 1.0)
2. Cost & Schedule estimates for different phases. 30
Measuring Cost and Effort
Solution

Size of five modules are:

Screen edit = 4 KLOC


Command language interpreter = 2 KLOC
File input and output = 1 KLOC
Cursor movement = 2 KLOC
Screen movement = 3 KLOC
Total = 12 KLOC
Measuring Cost and Effort
Let us assume that significant cost drivers are

i. Required software reliability is high, i.e.,1.15

ii. Product complexity is high, i.e.,1.15

iii. Analyst capability is high, i.e.,0.86

iv. Programming language experience is low,i.e.,1.07

v. All other drivers are nominal


EAF = 1.15x1.15x0.86x1.07 = 1.2169
Measuring Cost and Effort
(a) The initial effort estimate for the project is
obtained from the following equation

E = ai (KLOC)bi x EAF
= 3.2(12)1.05 x 1.2169 = 52.91 PM
Development time D = Ci(E)di
= 2.5(52.91)0.38 = 11.29 M
(b) Using the following equations and referring Table 7, phase wise
cost and schedule estimates can be calculated.
Ep   pE
Dp   pD
Measuring Cost and Effort
COCOMO-II

The following categories of applications / projects are identified


by COCOMO-II and are shown in fig. 4 shown below:
Application
generators &
composition
aids
End user Application Infrastructure
programming composition

System
integration

Fig. 4 : Categories of applications / projects


Measuring Cost and Effort
Stage Model Name Application for the Applications
No types of projects

Stage I Application composition Application composition In addition to application


estimation model composition type of projects, this
model is also used for prototyping
(if any) stage of application
generators, infrastructure & system
integration.

Stage II Early design estimation Application generators, Used in early design stage of a
model infrastructure & system project, when less is known about
integration the project.

Stage III Post Application generators, Used after the completion of


architecture estimation infrastructure & system the detailed architecture of the
model integration project.

Table 8: Stages of COCOMO-II


Measuring Cost and Effort
Application Composition Estimation Model

Fig.5: Steps for the estimation of effort in person months


Measuring Cost and Effort
i. Assess object counts: Estimate the number of screens, reports and
3 GL components that will comprise this application.

ii. Classification of complexity levels: We have to classify each


object instance into simple, medium and difficult complexity
levels depending on values of its characteristics.

Table 9 (a): For screens


Measuring Cost and Effort

Table 9 (b): For reports


Measuring Cost and Effort
iii. Assign complexity weight to each object : The weights are used
for three object types i.e., screen, report and 3GL components using
the Table 10.

Table 10: Complexity weights for each level


Measuring Cost and Effort
iv. Determine object points: Add all the weighted object instances to
get one number and this known as object-point count.

v. Compute new object points: We have to estimate the percentage


of reuse to be achieved in a project. Depending on the
percentage reuse, the new object points (NOP) are computed.

(object points) * (100-%reuse)


NOP =
100

NOP are the object points that will need to be developed and differ
from
the object point count because there may be reuse.
Measuring Cost and Effort
vi. Calculation of productivity rate: The productivity rate can be
calculated as:
Productivity rate (PROD) = NOP/Person month

Table 11: Productivity values


Measuring Cost and Effort

vii. Compute the effort in Persons-Months: When PROD is known,


we may estimate effort in Person-Months as:

NOP
Effort in PM = ------------
PROD
Measuring Cost and Effort
Example: 4.9
Consider a database application project with the following
characteristics:
I. The application has 4 screens with 4 views each and 7 data
tables for 3 servers and 4 clients.
II. The application may generate two report of 6 sections each
from 07 data tables for two server and 3 clients.
There is 10% reuse of object points.
The developer’s experience and capability in the similar
environment is low. The maturity of organization in terms of
capability is also low. Calculate the object point count, New object
points and effort to develop such a project.
Measuring Cost and Effort
Solution
This project comes under the category of application composition
estimation model.
Number of screens = 4 with 4 views each
Number of reports = 2 with 6 sections each
From Table 9 we know that each screen will be of
medium complexity and each report will be difficult complexity.
Using Table 10 of complexity weights, we may calculate object point
count.
= 4 x 2 + 2 x 8 = 24
24 * (100 -10)
NOP = = 21.6
100
Measuring Cost and Effort

Table 11 gives the low value of productivity (PROD) i.e. 7.

NOP
Efforts in PM = -----------
PROD

21.6
Efforts = ----------- = 3.086 PM
7

You might also like