Software Engineering · Lesson 7 of 8 · Updated ·
Software Project Management — LOC, Function Points, COCOMO, CPM and Risk
"How long will it take and how many people do we need?" Every project manager must answer this — and every university exam has a COCOMO or function-point numerical.
1. Measuring size
LOC / KLOC (lines of code / thousands of lines). Easy to count after coding, but depends on language and style and is hard to know early.
Function points (FP) measure size from the functionality users see, independent of language.
Function point calculation
Count five components and multiply by weights (average complexity shown):
| Component | Weight (avg) |
|---|---|
| External Inputs (EI) | 4 |
| External Outputs (EO) | 5 |
| External Inquiries (EQ) | 4 |
| Internal Logical Files (ILF) | 10 |
| External Interface Files (EIF) | 7 |
(Simple and complex weights also exist: EI 3/4/6, EO 4/5/7, EQ 3/4/6, ILF 7/10/15, EIF 5/7/10.)
Example: 10 EI, 8 EO, 6 EQ, 4 ILF, 2 EIF, all average.
UFP (unadjusted) = 10×4 + 8×5 + 6×4 + 4×10 + 2×7 = 40 + 40 + 24 + 40 + 14 = 158
Then rate 14 general system characteristics from 0 to 5; their total is ΣFi. Say ΣFi = 42.
FP = UFP × (0.65 + 0.01 × ΣFi) = 158 × (0.65 + 0.42) = 158 × 1.07 = 169.06
(The multiplier — the value adjustment factor — ranges from 0.65 to 1.35.)
2. Basic COCOMO (Boehm, 1981)
Effort E = a × (KLOC)^b person-months Development time D = c × (E)^d months Average staff = E ÷ D
| Mode | Project type | a | b | c | d |
|---|---|---|---|---|---|
| Organic | small team, familiar, flexible (payroll) | 2.4 | 1.05 | 2.5 | 0.38 |
| Semi-detached | medium, mixed experience (a DBMS) | 3.0 | 1.12 | 2.5 | 0.35 |
| Embedded | tight hardware/real-time constraints (avionics) | 3.6 | 1.20 | 2.5 | 0.32 |
Solved example
An organic project of 32 KLOC.
- E = 2.4 × 32^1.05 = 91.3 person-months
- D = 2.5 × 91.3^0.38 = 13.9 months
- Staff = 91.3 ÷ 13.9 ≈ 6.6, about 7 people
The same 32 KLOC as embedded: E = 3.6 × 32^1.20 = 230.4 PM, D = 14.3 months, about 16 people. Harder constraints mean much more effort for the same size.
Intermediate COCOMO multiplies effort by an EAF (effort adjustment factor) from 15 cost drivers (reliability, team capability, tools…). Detailed COCOMO applies drivers per phase. COCOMO II updates the model for modern, reuse-heavy development.
3. Scheduling
- Work breakdown structure (WBS) — split the project into small tasks.
- Gantt chart — tasks as bars on a calendar; shows overlaps and progress.
- PERT — for uncertain durations: expected time te = (o + 4m + p) ÷ 6 (optimistic, most likely, pessimistic). With o = 2, m = 4, p = 12: te = (2 + 16 + 12) ÷ 6 = 5 days.
- CPM (critical path method) — the longest path through the task network decides the project length.
Paths: A→B→D = 3 + 2 + 2 = 7 days; A→C→D = 3 + 4 + 2 = 9 days (critical). Any delay in A, C or D delays the project. B has slack (float) of 9 − 7 = 2 days.
4. Risk management
- Identify risks — project (staff leaves, budget cut), technical (new framework), business (market changes).
- Analyse — probability × impact = risk exposure.
- Plan — avoid, reduce (mitigate), transfer, or accept.
- Monitor throughout the project.
Example: risk "key developer may leave" (probability 30%, impact high) → mitigation: pair programming and documentation so knowledge is shared.
Common mistakes
- Using the organic constants for an embedded project.
- Forgetting COCOMO's input is in KLOC (32,000 lines = 32).
- Choosing the shortest path as the critical path — it's the longest.
Quick recap
- Size: LOC or function points (FP = UFP × (0.65 + 0.01 ΣFi)).
- Basic COCOMO: E = a(KLOC)^b, D = c(E)^d, staff = E ÷ D; organic, semi-detached, embedded.
- PERT te = (o + 4m + p) ÷ 6; critical path = longest path; slack = spare time.
- Risks: identify, analyse, plan, monitor.