SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
CAIE 9618 · Paper 2 · Topic 2.5.3

Software Maintenance
& Documentation

Corrective · Adaptive · Perfective · Internal & External Documentation

CSZone Cambridge International AS & A Level Computer Science 9618
Types of Software Maintenance

Three Types — Know Them All

After software is deployed, it must be maintained throughout its lifetime. The Cambridge spec defines three types:
Corrective
FIX BUGS
Fixing errors discovered after release. The software does not do what it was supposed to do. Bug was present at deployment but not caught during testing.
E.g. Tax calculation producing wrong result; login page crashes on Safari
Adaptive
ADAPT TO CHANGE
Modifying software to work in a new or changed environment. The environment has changed — not the software's fault. Also includes changes to meet new regulations.
E.g. Updating app after iOS 18 release; updating tax rates after new legislation
Perfective
IMPROVE
Adding new features or improving performance beyond the original spec. Software works correctly but is enhanced to meet user requests or improve efficiency.
E.g. Adding dark mode; optimising database queries to reduce load time
Internal Documentation

Documentation Inside the Code

Internal documentation is embedded within the source code itself, aimed at programmers working on or maintaining the code.
TYPES OF INTERNAL DOCUMENTATION
Inline comments — explaining what a block of code does (not how — the code shows how)
Meaningful identifiers — variables/procedures named clearly (e.g. calculateTotal not ct)
Indentation and structure — consistent formatting for readability
Header blocks — procedure/function descriptions, parameters, return values
// Calculate VAT on an amount
// Parameters: amount (REAL), rate (REAL)
// Returns: VAT amount (REAL)
FUNCTION calculateVAT(amount : REAL, rate : REAL) : REAL
  // Rate passed as decimal (e.g. 0.20 for 20%)
  RETURN amount * rate
ENDFUNCTION
Benefit: Enables programmers to understand, debug, and maintain code without needing to contact the original author.
External Documentation

Documentation Outside the Code

External documentation exists as separate documents. It targets different audiences at different stages of the software life cycle.
TECHNICAL DOCUMENTATION (for developers)
System specification — overall architecture
Data dictionary — all variables and their types
Data flow diagrams, entity-relationship diagrams
Algorithm design documents, pseudocode
Test plan — all tests, expected results, actual results
USER DOCUMENTATION (for end users)
User manual — how to install and use the software
Quick start guides and tutorials
Troubleshooting FAQ
Online help system / tooltips
MAINTENANCE DOCUMENTATION
Guides for future maintainers — known issues, change history, version notes, module dependencies.
Why Documentation Matters

Documentation Enables Maintenance

WITHOUT DOCUMENTATION
Maintainers must reverse-engineer the code to understand it
Risk of accidentally breaking working features when fixing bugs
Increased cost and time for every change
Knowledge lost when original developer leaves
WITH GOOD DOCUMENTATION
New developers understand system quickly
Corrective maintenance faster — root cause easier to find
Adaptive maintenance safer — dependencies documented
Perfective maintenance planned — architecture understood
Users can troubleshoot independently using the user manual
Exam Practice

Cambridge-style questions

Question 1
A company's payroll software was updated to handle a new pension scheme introduced by the government. State the type of maintenance carried out and give a reason for your answer. [2]
1
Adaptive maintenance.
1
Because the software was modified to accommodate a change in external requirements (new government legislation), not to fix a bug or add a feature requested by users.
Question 2
Explain why good documentation is important when carrying out software maintenance. [2]
Common Mistakes

Don't lose easy marks

1
Confusing corrective and adaptive — corrective = a bug was found (software behaved incorrectly). Adaptive = environment changed (new OS, new law, new hardware). A common trap: "updating the app for Windows 11" is adaptive not corrective — no bug was present.
2
Saying "documentation helps users" as the only benefit — in a maintenance question, the examiners want you to say documentation helps programmers/maintainers understand the system, find bugs faster, and make changes without breaking other parts. User documentation is secondary in this context.
3
Giving internal documentation examples for external documentation or vice versa — internal = inside the code (comments, meaningful identifiers, indentation). External = separate documents (user manual, technical spec, test plan, data dictionary). Never mix the two in the same answer.
Topic Summary — 2.5.3

What You Need to Know

MAINTENANCE TYPES
Corrective — fix bugs discovered post-release
Adaptive — adapt to changed environment/law
Perfective — improve features/performance
REMEMBER
Maintenance occurs after deployment. Most software spends more time being maintained than developed — hence documentation is critical.
DOCUMENTATION
Internal: comments, meaningful names, indentation, header blocks
External (technical): system spec, data dictionary, test plan, DFDs
External (user): user manual, quick start, FAQ, help system
CSZone

Next Video

3.1.1
Logic Gates & Boolean Algebra
Paper 3 · AND, OR, NOT, NAND, NOR, XOR
Head to CSZone.co.uk for the complete worksheet, quiz, and interactive tools