Software Maintenance & Evolution MCQs for NSCT
Software maintenance is any change made to software after it has been delivered, whether to fix faults, adapt it to a new environment or improve it. Software evolution is the long-term pattern of those changes, described by Lehman's laws. It is topic 11 of the Software Engineering area, which carries 10% of the NSCT according to HEC's Areas of Competencies. The area's 2026 average was 50.1% accuracy, per the HEC NSCT report and APP.
Maintenance usually costs more than the original development over a system's life, because useful systems stay in service for years. That is why exam questions focus on classifying changes and reasoning about their cost.
Maintenance types
ISO/IEC 14764, summarised in SWEBOK, defines four types and groups them into two classes.
| Type | Trigger | Example | Class |
|---|---|---|---|
| Corrective | A failure has been discovered | Fix a crash a user reported | Correction |
| Preventive | A latent fault is found before it fails | Fix a date overflow spotted in review | Correction |
| Adaptive | The environment changes | Update the app for a new OS or database version | Enhancement |
| Perfective | Users want improvements | Add a report, speed up a query, improve maintainability | Enhancement |
ISO/IEC 14764 also defines emergency maintenance: an unscheduled, temporary fix that keeps a system running until proper corrective maintenance is done.
Textbooks label these differently. Sommerville uses fault repair, environmental adaptation and functionality addition. Pressman and many lecture notes call restructuring for future maintainability "preventive", whereas SWEBOK places "improving maintainability" under perfective. In exams, follow the question's wording: a latent fault fixed before failure is preventive in every source.
Studies since Lientz and Swanson consistently find that enhancement (adaptive plus perfective) takes most maintenance effort, not bug fixing.
Exam angle: ask "did anything fail?" first. If yes, it is corrective; if a fault was found before failing, preventive; if the environment changed, adaptive; otherwise perfective.
Software evolution and Lehman's laws
Lehman classified programs as S-type (fully defined by a formal specification), P-type (a precise problem with an approximate solution, such as playing chess) and E-type (embedded in a real-world environment). His eight laws describe E-type systems:
- Continuing change: a system must keep adapting, or it becomes progressively less satisfactory.
- Increasing complexity: structure degrades with change unless work is done to reduce it.
- Self-regulation: evolution follows statistically regular trends.
- Conservation of organisational stability: the effective work rate stays roughly constant over a system's life.
- Conservation of familiarity: the change in each release stays roughly constant.
- Continuing growth: functionality must keep growing to keep users satisfied.
- Declining quality: quality appears to decline unless the system is actively maintained.
- Feedback system: evolution is a multi-loop, multi-agent feedback process.
Exam angle: "a huge release after several small ones" points to conservation of familiarity; "complexity rising while features stay flat" points to increasing complexity.
Legacy systems
A legacy system is an older system, often built with obsolete languages or platforms, that is still critical to the business. Its business rules are often buried in undocumented code. Sommerville assesses each one on business value and system quality:
| Low quality | High quality | |
|---|---|---|
| High value | Re-engineer, or replace if a suitable system exists | Continue normal maintenance |
| Low value | Scrap | Replace with an off-the-shelf system, scrap, or keep maintaining |
Exam angle: high value with low quality is the classic re-engineering candidate.
Re-engineering
Chikofsky and Cross define the key terms:
- Reverse engineering: analyse a system to recover its components and designs without changing it, for example by generating class diagrams from code.
- Restructuring: transform code at the same abstraction level while keeping its behaviour. Refactoring is the small-step, object-oriented form.
- Forward engineering: move from design down to a new implementation.
- Re-engineering: reverse engineering + alteration + forward engineering, to rebuild a system in a new form.
Pressman's re-engineering model is a cycle: inventory analysis, document restructuring, reverse engineering, code restructuring, data restructuring and forward engineering. Data re-engineering cleans and migrates data, such as moving flat files into a relational database.
For cost estimates, Boehm's COCOMO uses annual change traffic (ACT) = (KLOC added + KLOC modified) / total KLOC. Annual maintenance effort = ACT x development effort.
Exam angle: if nothing is changed, it is reverse engineering; if the form changes, it is re-engineering.
Common traps
- Calling a fix for a latent fault "corrective". If nothing has failed yet, it is preventive.
- Thinking bug fixing is the largest maintenance cost. Enhancements usually dominate.
- Calling an update for a new OS or database version "perfective". A changed environment makes it adaptive.
- Treating reverse engineering as changing code. It only analyses and documents.
- Applying Lehman's laws to S-type programs. They describe E-type systems.
- Leaving indirect dependants out of an impact analysis.
Worked examples
1. Understanding. How does reverse engineering differ from re-engineering? Answer: reverse engineering only examines a system and recovers designs. Re-engineering uses that understanding to alter the system and implement it in a new form.
2. Application. An 80 KLOC system took 400 person-months (PM) to build. Each year 6 KLOC are added and 2 KLOC are modified. Estimate the annual maintenance effort. Answer: 40 PM. ACT = (6 + 2) / 80 = 0.10, and 0.10 x 400 = 40 PM a year.
3. Analysis. Re-engineering would cost 240 PM and save 40 PM a year. The system will be retired in 4 years. Should the team re-engineer it? Answer: not on cost grounds. Break-even is 240 / 40 = 6 years, which is longer than the system's remaining life. Normal maintenance, or a cheaper partial restructuring, makes more sense.
Practise
The quiz below has 99 Software Maintenance & Evolution questions, filterable by tier and difficulty.
Practise: 99 questions
FAQs
What is the difference between maintenance and evolution?
Maintenance means the individual changes made after delivery: fixes, adaptations and enhancements. Evolution is the long-term view of how a system changes across many releases, and the forces behind it. Lehman's laws describe evolution; ISO/IEC 14764 classifies maintenance. Sommerville treats evolution as the stage where major changes are still made, and servicing as the later stage of small fixes only.
Is refactoring a type of maintenance?
Yes. Refactoring improves internal structure without changing behaviour. SWEBOK counts improving maintainability as perfective maintenance, while Pressman and many courses call it preventive, because it heads off future problems. Name the type the question's definition points to. Refactoring during development is also covered under implementation and coding.
Why are legacy systems not simply replaced?
Replacement is costly and risky. Legacy systems hold years of business rules that are often undocumented, and a big-bang switch can stop the business if anything is missed. Many organisations therefore re-engineer or replace them piece by piece while the old system keeps running.
How does change control relate to maintenance?
Every maintenance change should go through a change request, impact analysis, approval and a new baseline. That process belongs to software configuration management, and it keeps maintenance changes traceable and reversible.
Next step
Continue with Software Quality Assurance MCQs, return to the Software Engineering MCQ hub, or test yourself in an NSCT mock test.