Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is the COCOMO Model?
3.
A Procedural Cost Estimate Model
4.
Types of Software Projects
4.1.
1. Organic
4.2.
2. Semi-detached
4.3.
3. Embedded 
5.
Importance of the COCOMO Model
6.
Types of COCOMO Model
6.1.
Basic COCOMO Model
6.2.
Example 1
6.3.
Example 2
6.4.
Intermediate COCOMO Model 
6.5.
Example 1
6.6.
Example 2
6.7.
Detailed COCOMO Model 
6.8.
Example 1
6.9.
Example 2
7.
Calculation Steps for COCOMO
7.1.
Organic:
7.2.
Semi-detached:
7.3.
Embedded:
8.
Extension of COCOMO
9.
Advantages of COCOMO Model
10.
Disadvantages of the COCOMO Model
11.
Frequently Asked Questions
11.1.
What is COCOMO in software engineering?
11.2.
What are the three different types of COCOMO models?
11.3.
What are the three types of projects in COCOMO? 
11.4.
What are the three stages of the COCOMO model?
11.5.
What are the factors of COCOMO?
12.
Conclusion
Last Updated: Mar 27, 2024
Easy

COCOMO Model in Software Engineering

Author Lekhika
3 upvotes

Introduction

COCOMO stands for Constructive Cost Model, is a software project cost estimation model based on lines of code (LOC). It helps calculate time, effort, cost, and quality for proposed projects, offering a simple prediction of software project performance.

The overview of the COCOMO model, the general kinds of the model, the fundamental calculation of the COCOMO-based cost estimating approach, the extension of the model, and the strengths and shortcomings of the model will all be discussed in this article.

cocomo model in software engineering

What is the COCOMO Model?

COCOMO (Constructive Cost Model) is a regression model that depends on the number of Lines of Code (LOC). This model estimates the cost of software projects. Effort, size, time, cost, and quality are the various parameters that are the outcome of COCOMO. It was proposed by Barry Boehm in 1981. Based on the amount of accuracy and correctness, different models on COCOMO have beer proposed to predict the cost at different levels.

There are different system types namely, Organic, Semi-detached, and Embedded. We will study about them later in detail.

A Procedural Cost Estimate Model

Barry W. Boehm proposed COCOMO, a procedural software cost-estimating methodology, in 1981. This cost estimation technique is widely used to forecast the effort, development time, average team size, and work needed to complete a software project.

COCOMO's technique is unique in that it estimates costs based on the number of lines of source code and a set of subjective evaluations (cost drivers) of product, hardware, staff, and project features. This gives the model transparency, allowing software managers to understand why it makes its estimates. Furthermore, the basic COCOMO was designed to underpin the lifecycle of a waterfall model.

Types of Software Projects

Before diving into the COCOMO's basic concepts, readers must first understand the characteristics of software project types in order to apply the model.

COCOMO model techniques divide software projects into three categories: organic, semi-detached, and embedded.

1. Organic

A development project is called organic if it involves the creation of a well-understood application programme, the development team is relatively small, and the team members have previous expertise with similar projects.

2. Semi-detached

 A development project can be classified as semi-detached if it involves a mix of experienced and inexperienced personnel. The team members may have little expertise with related systems but may be unfamiliar with some system features under development.

3. Embedded 

A development project is deemed embedded if the software being created is tightly tied to complicated hardware or if the operational operations are subject to strict requirements.
The criteria for determining the type of software project to be used for subsequent calculations in the model are listed in the table below

  Organic Semi-detached Embedded
LOC(Project Size) 2,000 to 50,000 50,000 to 300,000 300,000 and above
Size of Team Small Medium Large
Developer Experience

Experienced

Developers

needed

Mix of Beginner

and Experienced

Developers

Good Experience

Developers

Developing

Environment

Familiar Less Familiar

Unfamiliar(New

Environment)

Innovation Minor Medium Major
Deadline Not Tight Medium Tight

Importance of the COCOMO Model

The COCOMO (Constructive Cost Model) is significant in software engineering for several reasons:

  • Cost Estimation: COCOMO provides a structured framework for estimating the cost, effort, and schedule required for software development projects. By considering various project parameters and factors, it helps stakeholders make informed decisions about resource allocation and project planning.
  • Project Management: COCOMO assists project managers in effectively managing software development projects by providing insights into the potential risks, challenges, and dependencies associated with different project phases. It enables them to set realistic goals, allocate resources efficiently, and track progress against predefined milestones.
  • Risk Management: The COCOMO model helps identify and mitigate potential risks early in the software development lifecycle. By quantifying project parameters and considering uncertainty factors, it enables project teams to assess the impact of risks and develop contingency plans to address them proactively.
  • Resource Allocation: COCOMO facilitates optimal resource allocation by estimating the personnel, time, and budget required for different project activities. It enables organizations to allocate resources effectively, balance workload across teams, and optimize productivity throughout the software development process.
  • Decision Support: COCOMO serves as a valuable decision support tool for software development organizations, enabling them to evaluate project feasibility, assess the impact of alternative development approaches, and make data-driven decisions to maximize return on investment (ROI) and minimize project risks.

Types of COCOMO Model

The COCOMO model allows software managers to choose how detailed they want to go when estimating costs for their projects. COCOMO can reveal a software product's efforts and timeline based on the size of the software at various levels. Basic COCOMO, Intermediate COCOMO, and Detailed/Completed COCOMO are the three levels of COCOMO.

Types of COCOMO Model

Basic COCOMO Model

The basic COCOMO is employed for rough calculations, limiting software estimation precision. This is because the model only considers lines of source code and constant values derived from software project types rather than other elements significantly impacting the software development process.

The expressions are as follows:

  • E=a x (KLOC) b
  • P=effort/time
  • D=c x (Effort) d

 

Here,  E is the effort in person-months, P is the total count of persons required to finish the project, D is the time of development in months, and KLOC denotes the product's size, i.e., the kilo lines of code. All the constants a, b, c, and d have varying values for different models.

Example 1

The basic COCOMO model can be a small web application. This project involves developing a simple web application, such as a personal blog or a static website for a small business. It typically includes basic features like static pages, simple navigation, and contact forms. The development effort and schedule for such a project can be estimated using the Basic COCOMO model based on the size and complexity of the application.

Example 2

The basic COCOMO model can be developing a simple mobile game. This project entails creating a mobile game with straightforward gameplay mechanics, limited graphics, and minimal user interactions. Examples include puzzle games, endless runners, or basic arcade-style games. The Basic COCOMO model can be applied to estimate the effort required for development, testing, and deployment of the game.

Intermediate COCOMO Model 

The Intermediate COCOMO model expands the Basic COCOMO model, which considers a collection of cost drivers to improve the accuracy of the cost-estimating model.

The expressions are as follows:

  • E=ax(KLOC)b x EAF PM
  • D=cx(Effort)d

 

Here,  E is the effort in person-months, KLOC denotes the product's size, i.e., the kilo lines of code, and EAF is the Effort Adjustment Factor calculated by multiplying the values of different parameters of different cost drivers.

The Cost Drivers and their attributes are classified as product attributes, hardware attributes, personal attributes, and project attributes.

Example 1

The intermediate COCOMO model can be building a medium-sized e-commerce platform. This project involves developing an e-commerce platform with standard features like user authentication, product listings, shopping cart functionality, and payment processing. It may also include additional features such as order management, inventory tracking, and customer support integration. The Intermediate COCOMO model considers the complexity and size of the platform to estimate the effort and resources required for development.

Example 2

The intermediate COCOMO model can be creating a business management software. This project focuses on developing software to manage various aspects of a small company's operations, such as accounting, inventory management, payroll processing, and customer relationship management (CRM). The software may need to handle moderate volumes of data and support multiple users simultaneously. The Intermediate COCOMO model can be used to estimate the effort and schedule for developing and deploying the software.

Detailed COCOMO Model 

The model contains all qualities of both Basic COCOMO and Intermediate COCOMO techniques for each Software Engineering process. The model considers each project's development phase (analysis, design, and so on). It is a complex model, considering the fact that it considers more parameters. Here, the whole software is parted into different modules and then the COCOMO model is applied to all the modules separately. Finally, the efforts are joined to calculate the total result.

The six phases of the Advanced/Detailed COCOMO Model are:

  • Planning and Requirements
  • System Design
  • Detailed Design
  • Module Code and Testing
  • Integration and Testing
  • Cost Constructive Model

 

Since each subsystem's cost is calculated separately, it reduces the margin of error. 

Example 1

The detailed COCOMO model can be developing an enterprise-level customer relationship management (CRM) system. This project involves creating a comprehensive CRM system for a large organization with complex business processes and extensive customization requirements. The system may need to integrate with multiple external systems, support advanced analytics and reporting features, and scale to accommodate a large user base. The Detailed COCOMO model takes into account the intricacies and size of the CRM system to estimate the effort, cost, and schedule for its development.

Example 2

The detailed COCOMO model can be designing and implementing a complex financial analytics platform. This project entails developing a sophisticated platform for analyzing financial data, performing complex calculations, and generating insightful reports for a large investment firm or financial institution. The platform may require advanced algorithms, real-time data processing capabilities, and stringent security measures to comply with regulatory requirements. The Detailed COCOMO model provides a detailed estimation of the effort, resources, and timeline needed to build and deploy the financial analytics platform.

Calculation Steps for COCOMO

The following are the general calculation steps for COCOMO-based cost estimation:

  1. Get an early estimate of the development effort by analyzing thousands of lines of provided source code (KLOC).
     
  2. Determine 15 cost factors based on the project's varied characteristics.
     
  3. Multiply the initial estimate with all the multiplying factors, i.e., multiply the preceding steps' values to get the effort estimate.
     

Predefined formulae are used to compute the effort and the time required to perform the task.

The formula is as follows:

Effort(E)= a*(KLOC)^b  PM(Person month)

Time = c(E)d

Person Required = effort/time

Where KLOC denotes the product's size, i.e., the number of lines of code.

All the constants a, b, c, and d have varying values for different models.

The unit is months, and time is the time it takes to develop a product.

And the effort is the overall amount of action necessary to finish the work in PM (Person Months).

Boehm's values for a, b, c, and d for several product types (i.e., organic, semidetached, and embedded) are summarised here.

Boehm's values

The equations will be as follows if actual values replace the constants:

Organic:

E = 2.4(KLOC) 1.05 PM

T = 2.5(E) 0.38 Months

Semi-detached:

E= 3.0(KLOC) 1.12 PM

T = 2.5(E) 0.35 Months

Embedded:

E= 3.6(KLOC) 1.20 PM

T= 2.5(E) 0.32 Months

This is how the project's effort and completion time are calculated.

Extension of COCOMO

Although this article only covers the COCOMO I model (1981), it is worthwhile for you to conduct additional research on the COCOMO model's extension.

COCOMO II (1995) is a natural extension of COCOMO I and is used in various software development processes, including AgileIterative waterfall, and spiral waterfall models.

On top of the COCOMO I and COCOMO II models. Constructive Rapid Application Development Schedule Estimation Model (CORADMO) and Constructive Phased Schedule & Effort Model(COPSEMO) are two examples of such models.

Advantages of COCOMO Model

  • COCOMO is transparent, and unlike other models such as SLIM, it is possible to observe how it operates.
     
  • COCOMO is more predictable and reliable because it is based on historical data or previous experience.
     
  • Elements that are simple to execute, such as the drivers, aid in estimating the influence of many factors that affect projects.
     
  • The entire cost of the projects is easy to estimate. This is due to COCOMO's usage of a regression algorithm based on previous projects.

Disadvantages of the COCOMO Model

While the COCOMO (Constructive Cost Model) is a widely used and valuable tool in software engineering, it does have some limitations and disadvantages:

  • COCOMO relies on simplified assumptions and models to estimate project costs, effort, and schedule. As a result, it may not accurately capture the complexities and nuances of real-world software development projects, leading to potentially inaccurate estimations.
     
  • COCOMO may not be suitable for all types of software projects, particularly those involving emerging technologies, complex architectures, or non-traditional development methodologies. Its applicability is primarily limited to well-defined and structured projects.
     
  • COCOMO heavily relies on historical data and past project experiences to calibrate its estimation parameters. However, this approach may not be applicable to new or innovative projects that lack relevant historical data, resulting in unreliable estimations.
     
  • COCOMO may not easily accommodate changes or variations in project requirements, scope, or development methodologies. It assumes a linear relationship between project size and effort, which may not hold true for all projects, leading to inflexibility in estimation.
     
  • The COCOMO model may require significant expertise and effort to apply correctly. It involves multiple estimation parameters, calibration factors, and assumptions that need to be carefully understood and configured, making it challenging for inexperienced users.

Frequently Asked Questions

What is COCOMO in software engineering?

COCOMO (Constructive Cost Model) is a regression model that depends on the number of Lines of Code (LOC). This model estimates the cost of software projects. Effort, size, time, cost, and quality are the various parameters that are the outcome of Cocomo.

What are the three different types of COCOMO models?

The difference is that the basic model calculates rough cost estimations, and the intermediate model expands it by considering the collection of cost drivers. The detailed Model considers all the parameters, calculates costs module-wise, and joins the result, reducing the error efficiently.

What are the three types of projects in COCOMO? 

COCOMO model techniques divide software projects into three categories: organic, semi-detached, and embedded. These are categorized on the basis of the sizes of teams and the project, developer experience, the developing environment, innovation, and deadline.

What are the three stages of the COCOMO model?

The three stages of the COCOMO model are Basic COCOMO, Intermediate COCOMO, and Detailed COCOMO, each offering increasingly detailed estimations based on project characteristics and size.

What are the factors of COCOMO?

COCOMO considers factors such as product attributes, hardware attributes, personnel attributes, project attributes, and environmental attributes when estimating software development costs and effort.

Conclusion

In this article, we discussed the COCOMO Model in Software Engineering. The COCOMO (Constructive Cost Model) serves as a fundamental tool in software engineering, offering structured approaches to estimate project costs, effort, and schedules across different stages of development. 

Recommended Reading -


We wish you Good Luck! Keep coding and keep reading Ninja!!

Live masterclass