Bird
Raised Fist0
Software Engineeringknowledge~10 mins

COCOMO model in Software Engineering - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - COCOMO model
Start: Project Size Estimation
↓
Select COCOMO Model Type
↓
Basic
↓
Calculate Effort
↓
Calculate Development Time
↓
Estimate People Required
↓
Project Plan
The COCOMO model starts by estimating project size, choosing a model type, then calculating effort, time, and staffing to plan the project.
Execution Sample
Software Engineering
Effort = a * (Size)^b
Time = c * (Effort)^d
People = Effort / Time
Calculates effort, development time, and people needed based on project size using COCOMO formulas.
Analysis Table
StepVariableCalculationValueExplanation
1SizeGiven100 KLOCProject size in thousands of lines of code
2Model TypeSelectedBasicSimple COCOMO model chosen
3Effort2.4 * (100)^1.05302.1 Person-MonthsEffort estimated using formula for Basic model
4Time2.5 * (302.1)^0.3821.9 MonthsDevelopment time estimated
5People302.1 / 21.913.8 PeopleAverage staff needed
6End--Estimation complete
💡 All calculations done; project effort, time, and staffing estimated.
State Tracker
VariableStartAfter Step 3After Step 4After Step 5Final
Size (KLOC)100100100100100
Effort (Person-Months)N/A302.1302.1302.1302.1
Time (Months)N/AN/A21.921.921.9
People (Count)N/AN/AN/A13.813.8
Key Insights - 3 Insights
Why does the effort increase more than linearly with project size?
Because the effort formula uses an exponent greater than 1 (1.05), effort grows faster than size, reflecting complexity increase (see Step 3 in execution_table).
Why do we divide effort by time to get people?
People needed is effort spread over time, so dividing total person-months by months gives average staff (Step 5).
What changes if we select Intermediate or Detailed model?
They add adjustment factors for project attributes, changing coefficients and calculations beyond the basic formula (not shown in this simple trace).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table at Step 3, what is the effort calculated for 100 KLOC?
A100 Person-Months
B302.1 Person-Months
C16.7 Person-Months
D2.4 Person-Months
💡 Hint
Check the 'Value' column at Step 3 in execution_table.
At which step does the model estimate the number of people needed?
AStep 5
BStep 4
CStep 2
DStep 6
💡 Hint
Look for the step where People is calculated in execution_table.
If the project size doubles, how does the effort change according to the formula?
AEffort doubles exactly
BEffort increases less than double
CEffort increases more than double
DEffort stays the same
💡 Hint
Refer to the exponent 1.05 in the effort formula in execution_sample.
Concept Snapshot
COCOMO Model Quick Reference:
- Input: Project size (KLOC)
- Effort = a * (Size)^b (a,b depend on model type)
- Time = c * (Effort)^d
- People = Effort / Time
- Models: Basic, Intermediate, Detailed
- Estimates effort, time, and staffing for software projects
Full Transcript
The COCOMO model helps estimate software project effort, time, and staffing based on project size. First, you estimate the size in thousands of lines of code (KLOC). Then, you select a model type: Basic, Intermediate, or Detailed. Using formulas with coefficients and exponents, you calculate the effort in person-months, the development time in months, and the average number of people needed. For example, with 100 KLOC and the Basic model, effort is about 302 person-months, time about 22 months, and staff about 14 people. Effort grows faster than size due to complexity. Dividing effort by time gives staffing. More detailed models adjust calculations with project attributes. This step-by-step process helps plan software projects realistically.

Practice

(1/5)
1. What is the primary purpose of the COCOMO model in software engineering?
easy
A. To manage software version control
B. To design the user interface of software
C. To test software for bugs
D. To estimate the effort and time required for a software project

Solution

  1. Step 1: Understand COCOMO's role

    COCOMO stands for Constructive Cost Model and is used to estimate effort and time.
  2. Step 2: Compare options

    Only To estimate the effort and time required for a software project describes estimation of effort and time, which matches COCOMO's purpose.
  3. Final Answer:

    To estimate the effort and time required for a software project -> Option D
  4. Quick Check:

    COCOMO estimates effort and time [OK]
Hint: COCOMO estimates project effort and duration [OK]
Common Mistakes:
  • Confusing COCOMO with testing or design tools
  • Thinking COCOMO manages code versions
  • Assuming COCOMO is for UI design
2. Which of the following is a correct formula used in the basic COCOMO model to estimate effort (in person-months)?
easy
A. Effort = a * (KLOC)^b
B. Effort = a + b * KLOC
C. Effort = a / (KLOC)^b
D. Effort = a * b + KLOC

Solution

  1. Step 1: Recall COCOMO effort formula

    Basic COCOMO uses Effort = a * (KLOC)^b, where a and b are constants and KLOC is thousands of lines of code.
  2. Step 2: Check options

    Only Effort = a * (KLOC)^b matches the correct formula structure with multiplication and exponent.
  3. Final Answer:

    Effort = a * (KLOC)^b -> Option A
  4. Quick Check:

    Effort formula uses multiplication and power [OK]
Hint: Look for multiplication and exponent in effort formula [OK]
Common Mistakes:
  • Using addition or division instead of multiplication and power
  • Mixing constants incorrectly
  • Confusing effort with time formulas
3. Given a software project with 50 KLOC, and basic COCOMO constants a=2.4 and b=1.05, what is the estimated effort in person-months? (Use formula: Effort = a * (KLOC)^b)
medium
A. About 100 person-months
B. About 150 person-months
C. About 130 person-months
D. About 90 person-months

Solution

  1. Step 1: Apply the formula with given values

    Effort = 2.4 * (50)^1.05. Calculate 50^1.05 ≈ 60.8.
  2. Step 2: Calculate effort

    Effort ≈ 2.4 * 60.8 = 145.9 person-months, approximately 150 person-months.
  3. Final Answer:

    About 150 person-months -> Option B
  4. Quick Check:

    2.4 * 50^1.05 ≈ 146 [OK]
Hint: Calculate power first, then multiply by constant a [OK]
Common Mistakes:
  • Forgetting to raise KLOC to power b
  • Using wrong constants
  • Rounding too early causing big errors
4. A developer wrote this COCOMO effort estimation code snippet but it gives wrong results:
effort = a * KLOC ** b

Given a=2.5, b=1.1, KLOC=40, what is the likely error?
medium
A. Incorrect order of operations causing wrong calculation
B. Not converting KLOC to thousands of lines
C. No error; code is correct
D. Using exponentiation operator incorrectly in this context

Solution

  1. Step 1: Analyze the formula and code

    The code uses Python exponentiation operator ** correctly for Effort = a * KLOC^b.
  2. Step 2: Check variable values and units

    KLOC is already in thousands of lines (40), so no conversion needed. The formula and code match.
  3. Final Answer:

    No error; code is correct -> Option C
  4. Quick Check:

    Code matches formula and units [OK]
Hint: Check if code matches formula and units exactly [OK]
Common Mistakes:
  • Assuming exponent operator is wrong in Python
  • Forgetting KLOC unit is already thousands
  • Thinking order of operations is incorrect
5. A software project is classified as 'organic' in COCOMO with constants a=2.4, b=1.05, c=2.5, d=0.38. If the project size is 30 KLOC, what is the estimated development time (in months)? Use formulas:
Effort = a * (KLOC)^b
Time = c * (Effort)^d
hard
A. About 13.5 months
B. About 10.2 months
C. About 7.3 months
D. About 8.5 months

Solution

  1. Step 1: Calculate effort

    Effort = 2.4 * (30)^1.05. Calculate 30^1.05 ≈ 35.6. Effort ≈ 2.4 * 35.6 = 85.4 person-months.
  2. Step 2: Calculate development time

    Time = 2.5 * (85.4)^0.38. Calculate 85.4^0.38 ≈ 5.42. Time ≈ 2.5 * 5.42 = 13.55 months.
  3. Final Answer:

    About 13.5 months -> Option A
  4. Quick Check:

    Time = c * Effort^d ≈ 13.5 months [OK]
Hint: Calculate effort first, then apply time formula [OK]
Common Mistakes:
  • Calculating time without effort first
  • Using wrong constants for organic projects
  • Rounding intermediate values too early
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard