Sie sind auf Seite 1von 7

ASSIGNMENT II

PROBLEM STATEMENT:

Design a procedure to determine the Effort, Time and number of Personal


required for developing software for an Organic Type using COCOMO. The
values of the effective customer drivers are to be read from an array and the
number of Lines Of Code (LOC) would be supplied as data.

CONSTRUCTIVE COST MODEL (COCOMO)

The Constructive Cost Model (COCOMO) is an algorithmic software cost


estimation model developed by Barry Boehm. The model uses a basic regression
formula, with parameters that are derived from historical project data and current
project characteristics.

COCOMO consists of a hierarchy of three increasingly detailed and accurate


forms. The first level, Basic COCOMO is good for quick, early, rough order of
magnitude estimates of software costs, but its accuracy is limited due to its lack
of factors to account for difference in project attributes (Cost Drivers).
Intermediate COCOMO takes these Cost Drivers into account and Detailed
COCOMO additionally accounts for the influence of individual project phases.

Basic COCOMO

Basic COCOMO computes software development effort (and cost) as a function


of program size. Program size is expressed in estimated thousands of lines of
code (KLOC)

COCOMO applies to three classes of software projects:

• Organic projects - "small" teams with "good" experience working with "less
than rigid" requirements
• Semi-detached projects - "medium" teams with mixed experience working
with a mix of rigid and less than rigid requirements
• Embedded projects - developed within a set of "tight" constraints
(hardware, software, operational, ......)

The basic COCOMO equations take the form

Effort Applied = ab(KLOC)bb [ person-months ]


Development Time = cb(Effort Applied)db [months]
People required = Effort Applied / Development Time [count]
The coefficients ab, bb, cb and db are given in the following table.

Software project ab bb cb db
Organic 2.4 1.05 2.5 0.38
Semi-detached 3.0 1.12 2.5 0.35
Embedded 3.6 1.20 2.5 0.32

Basic COCOMO is good for quick estimate of software costs. However it does
not account for differences in hardware constraints, personnel quality and
experience, use of modern tools and techniques, and so on.

Intermediate COCOMOs

Intermediate COCOMO computes software development effort as function of


program size and a set of "cost drivers" that include subjective assessment of
product, hardware, personnel and project attributes. This extension considers a
set of four "cost drivers",each with a number of subsidiary attributes:-

• Product attributes
o Required software reliability
o Size of application database
o Complexity of the product
• Hardware attributes
o Run-time performance constraints
o Memory constraints
o Volatility of the virtual machine environment
o Required turnabout time
• Personnel attributes
o Analyst capability
o Software engineering capability
o Applications experience
o Virtual machine experience
o Programming language experience
• Project attributes
o Use of software tools
o Application of software engineering methods
o Required development schedule

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). An effort multiplier
from the table below applies to the rating. The product of all effort
multipliers results in an effort adjustment factor (EAF). Typical values for
EAF range from 0.9 to 1.4.
Ratings
Very Very Extra
Cost Drivers Low Low Nominal High High 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

The Intermediate Cocomo formula now takes the form:

E=ai(KLoC)(bi).EAFwhere E is the effort applied in person-months, KLoC


is the estimated number of thousands of delivered lines of code for the
project, and EAF is the factor calculated above. The coefficient ai and the
exponent bi are given in the next table.

Software project ai bi
Organic 3.2 1.05
Semi-detached 3.0 1.12
Embedded 2.8 1.20

PROGRAM CODE:.

// Effort, Time and number of Personal determination

#include<stdio.h>
#include<conio.h>
#include<math.h>
#include<stdlib.h>
main()
{
int i,ch;
double kloc,iee,eaf,aee,dt,pi;
//double approx_aee,approx_dt,approx_pi;
//double fraction,integer;
struct cost_drivers
{
char a[30];
double r[6];
};
struct cost_drivers drivers[] =
{
{"RELY",.75,.88,1,1.15,1.4,0},
{"DATA",0,.94,1,1.08,1.16,0},
{"CPLX",.7,.85,1,1.15,1.3,1.65},
{"TIME",0,0,1,1.11,1.30,1.66},
{"STOR",0,0,1,1.06,1.21,1.56},
{"VITR",0,.87,1,1.15,1.3,0},
{"TURN",0,.87,1,1.07,1.15,0},
{"ACAP",1.46,1.19,1,.86,.71,0},
{"AEXP",1.29,1.13,1,.91,.82,0},
{"PCAP",1.42,1.17,1,.86,.7,0},
{"VEXP",1.21,1.1,1,.9,0,0},
{"LEXP",1.14,1.07,1,.95,0,0},
{"MODP",1.24,1.1,1,.91,.82,0},
{"TOOL",1.24,1.1,1,.91,.83,0},
{"SCHED",1.23,1.08,1,1.04,1.1,0}
};
printf("ENTER THE NO. OF LINES OF SOURCE CODE (in kloc) : ");
scanf("%lf",&kloc);
iee = 3.2 * (pow(kloc,1.05));
sprintf("\nENTER THE RATING OF EACH COST DRIVERS : \n\n");
eaf = 1;
for (i=0;i<15;i++)
{
while(1)
{
printf("%s", drivers[i].a);
if (drivers[i].r[0] != 0)
printf("\t1.VERY LOW");
if (drivers[i].r[1] != 0)
printf("\t2.LOW");
if (drivers[i].r[2] != 0)
printf("\t3.NOMINAL");
if (drivers[i].r[3] != 0)
printf("\t4.HIGH");
if (drivers[i].r[4] != 0)
printf("\t5.VERY HIGH");
if (drivers[i].rating[5] != 0)
printf(" 6.EXTRA HIGH");

printf("\nENTER YOUR CHOICE : ");


scanf("%d",&ch);
ch = ch - 1;
if (drivers[i].r[ch]>0 && ch>=0 && ch<=5)
break;
else
printf("\nENTER CORRECT CHOICE..\n");
}
eaf = eaf * drivers[i].r[ch];
//printf("%lf",eaf);
//printf("\n");
}
//printf("\neaf = %lf",eaf);
aee = iee * eaf;
//printf("\naee = %lf",aee);
//a = pow(abs(aee),0.38);
dt = 2.5 * pow(abs(aee),0.38);
//printf("\ndt = %lf",dt);
pi = aee / dt;
//printf("\napprox_aee = %lf",approx_aee);
//printf("\napprox_dt = %lf",approx_dt);
//printf("\napprox_pi = %lf",approx_pi);
printf("\nEFFORT : %lf",aee);
printf("\nTIME : %lf",dt);
printf("\nPERSONS : %lf",pi);
//printf("\nEFFORT : %lf",aee);
//printf("\nTIME : %lf",dt);
//printf("\nPERSONS : %lf",pi);
}

OUTPUT:

ENTER THE NO. OF LINES OF SOURCE CODE (in kloc) : 20

ENTER THE RATING OF EACH COST DRIVERS :

RELY 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3
DATA 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH
ENTER YOUR CHOICE : 3

CPLX 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


6. EXTRA HIGH
ENTER YOUR CHOICE : 3

TIME 3.NOMINAL 4.HIGH 5.VERY HIGH 6. EXTRA HIGH


ENTER YOUR CHOICE : 3

STOR 3.NOMINAL 4.HIGH 5.VERY HIGH 6. EXTRA HIGH


ENTER YOUR CHOICE : 3

VITR 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

TURN 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

ACAP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

AEXP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

PCAP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

VEXP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH


ENTER YOUR CHOICE : 3

LEXP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH


ENTER YOUR CHOICE : 3

MODP 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

TOOL 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

SCHED 1.VERY LOW 2.LOW 3.NOMINAL 4.HIGH 5.VERY HIGH


ENTER YOUR CHOICE : 3

EFFORT : 74.341526
TIME : 12.830632
PERSONS : 5.794066
DISCUSSIONS:

1. For this particular input kloc = 20.

2. Rating for all drivers: nominal

Hence effort_adjustment_factor = 1

3. EFFORT : 74.341526 = 74 approx.


TIME : 12.830632 = 13 approx.
PERSONS : 5.794066 = 6 approx.

4. This code could have been further improved to include estimates of effort
required for different phases. In COCOMO, effort for a phase is a defined
percentage of the overall effort.

Das könnte Ihnen auch gefallen