Search Tutorials

Thursday 16 May 2013

C code for Intermediate Cocomo Model

The basic COCOMO model allowed for a quick and rough estimate, but it resulted in a lack of accuracy. Boehm introduced an additional set of 15 predictors called “cost drivers” in the intermediate model to take account of the software development environment. Cost drivers are used to adjust the nominal cost of the project to the actual project environment, hence increasing the accuracy of the estimate. The cost drivers are grouped into four categories:

1. Product attributes

(a) Required software reliability
(b) Size of application database
(c) Complexity of the product

2. Hardware attributes

(a) Run-time performance constraints
(b) Memory constraints
(c) Volatility of the virtual machine environment
(d) Required turnabout time

3. Personnel attributes

(a) Analyst capability
(b) Software engineering capability
(c) Applications experience
(d) Virtual machine experience
(e) Programming language experience 

4. Project attributes

(a) Use of software tools
(b) Application of software engineering methods
(c) Required development schedule

Each cost driver is rated for a given project environment. The rating uses a scale very low, low, nominal, high, very high, extra high which describes to what extends the cost driver applies to the project being estimated. Table given below, gives the multiplier values for the 15 cost drivers and their rating provided by Boehm.

Intermediate COCOMO Model cost drivers

The multiplying factors for all 15 cost drivers are multiplied to get the effort adjustment factor(EAF). Typical values for EAF range from 0.9 to 1.4. The Intermediate COCOMO model equations take the form: 



Where co-efficients ai and  bi  are given below in table:

Intermediate COCOMO Model Co-efficients

And ci and di uses  in the same way as in the Basic COCOMO.

//C program to calculate effort, development time, productivity and average staff required in Intermediate cocomo model//


int fround(float x)
  int a;

void main()
  float table[3][4]={3.2,1.05,2.5,0.38,3.0,1.12,2.5,0.35,2.8,1.20,2.5,0.32};
  int i,j,size,model,rating;
  char mode[][15]={"Organic","Semi-Detached","Embedded"};
  char driver[15][6]={"RELY","DATA","CPLX","TIME","STOR","VIRT","TURN","ACAP","AEXP","PCAP",

  float effort,EAF,a,time,staff,productivity;
  float costdrivers[15][6]={


















  printf("\nEnter the size of project : ");


  if(size>=2 && size<=50)


  else if(size>50 && size<=300)


  else if(size>300)


  printf("\nMode = %s",mode[model]);






    printf("\nRate cost driver %s on scale of 0-5 : ",driver[i]);

    printf("\n0-Very Low\t1-Low\t2-Nominal\t3-High\t4-Very High\t5-Extra High\n");





       printf("\nNo value exist for this rating..Enter another rating...\n");





  printf("\nEAF = %f",EAF);

  effort=(table[model][0]*pow(size,table[model][1])) * EAF;




  printf("\n\nEffort = %f Person-Month",effort);

  printf("\nDevelopment Time = %f Months",time);

  printf("\nAverage Staff Required = %d Persons",fround(staff));

  printf("\nProductivity = %f KLOC/Person-Month",productivity);


Comment your valuable feedback related to this program.

Related Post:-
1. C code to implement Basic Cocomo Model
2. C code to implement Detailed Cocomo Model
3. C code to implement stage-1 of Cocomo-2 Model
4. C code to implement stage-2 of Cocomo-2 Model
5. C code to implement stage-3 of Cocomo-2 Model

No comments:

Post a Comment

Back to Top