Before the start of any software project, various factors are taken into consideration. These factors decide how the project development phase will proceed, how the product will be deployed, and what are the risks involved.
One of these factors includes the time and cost factor. It is important to know how much time will it take before the product is ready for deployment. Cost does also plays a very important factor during the development of the product.
Keeping this in mind in 1981, Boehm proposed a model – COCOMO model (Constructive Cost Estimation model) to estimate the cost and effort required to complete any product based on its size. This model was not very accurate but still gives a good rough idea and is still in use.
What is COCOMO model?
COCOMO or Constructive Cost Estimation Model is a model that estimates the effort and time taken to complete the model based on the size of the source code. It includes 15 multiplying factors from different attributes of the project, and finally calculates time and effort using this information.
The COCOMO model first divides the software based on its size. Let us first understand how each software is differentiated.
Software Project Type
The Cocomo model divides software projects into 3 types-
Let us learn about them one by one.
ORGANIC – A software development project comes under organic type if the development team is small, the problem is not complex, and has been solved before. Also, a nominal experience of team members is considered. Some of the projects that can be organic are- small data processing systems, basic inventory management systems, business systems.
SEMIDETACHED – A software project that is in-between the organic and embedded system is a semi-detached system. Its characteristics include – a middle-sized development team, with a mix of both- experienced and inexperienced members, and the project complexity is neither too high nor too low.
The problems faced in this project are a few known and a few unknown, which have never been faced before. Few such projects are- Database Management System(DBMS), new unknown operating system, difficult inventory management system.
EMBEDDED – A project requiring a large team with experienced members, and having the highest level of complexity is an embedded system. The members need to be creative enough to be able to develop complex models. Such projects include- air traffic models, ATMs, complex banking systems, etc.
Types of COCOMO Model
The different types of COCOMO models define the depth of cost estimation is required for the project. It depends on the software manager, what type of model do they choose.
According to Boehm, the estimation should be divided into 3 stages-
- Basic Model
- Intermediate Model
- Detailed Model
Boehm had set different expressions to calculate effort and development time through KLOC (Kilo line of code). All these calculations are roughly correct and not exact because of the absence of sufficient factors.
Basic Model – This model is based on rough calculations thus, there is very limited accuracy. The whole model is based on only lines of source code to estimate the calculation and other factors are neglected.
Intermediate Model – The intermediate model dives deeper and includes more factors such as cost drivers into the calculation. This enhances the accuracy of estimation. The cost driver includes attributes like reliability, capability, and experience.
These cost drivers can be classified under-
- Product attributes
- size of the application’s database
- the complexity of the product
- software’s reliability extent
- Hardware attributes
- Total turnabout time
- Memory constraints
- Run-time performance constraints
- Project attributes
- software tools used
- required development schedule
- Personnel attributes
- Applications experience
- Coding experience
- Software developer’s capability
- Analyst experience
Detailed Model – The detailed model or the complete model includes all the factors of the both-the basic model and the intermediate model. In the detailed model for each cost driver property, various effort multipliers are used.
The whole software is divided into smaller phases and then the COCOMO calculations or model is applied to them. The effort is then estimated and then the sum of the efforts is calculated.
The software is divided into 6 different phases namely-
- Planning and requirements
- System structure
- Integration and test
- Cost Constructive model
- Complete structure
- Module code and test
The effort and the time taken to complete both are calculated through predefined equations.
The formula used is-
Effort(E)= a*(KLOC)^b PM(Person month)
Time = c(E)d
Person Required = effort/time
KLOC = size of the product i.e. no. of lines of code.
a, b, c, d are constants and have different values for different models.
Time is the time required to develop the product and the unit is months.
And the effort is the total effort calculated that will be required to complete the work calculated in PM (Person Months).
If the constants are replaced by actual values, then the equations will be-
E = 2.4(KLOC) 1.05 PM
T = 2.5(E) 0.38 Months
E= 3.0(KLOC) 1.12 PM
T = 2.5(E) 0.35 Months
E= 3.6(KLOC) 1.20 PM
T= 2.5(E) 0.32 Months
This is how the effort and time taken to complete the project are calculated.
Although neither of these calculations is precise still it gives a rough idea or estimation about the cost of the project and time taken to complete it. Considering these factors the model does help and keeps transparency between the client and the developers.
However, it comes with its disadvantages. Like, it does not consider factors like customer skills, cooperation, knowledge, and some other parameters. And as it is dependent on a few factors thus if the actual time taken is more than the calculation then it affects the project as a whole.
Thus it is always advised to be cautious while depending on any such practice or method.
Kuldeep is the founder and lead author of ArtOfTesting. He is skilled in test automation, performance testing, big data, and CI-CD. He brings his decade of experience to his current role where he is dedicated to educating the QA professionals. You can connect with him on LinkedIn.