---
title: "Maintenance types; design for maintainability"
subject: "Software Engineering"
chapter: 10
key: "semester_5/software_engineering:maintainability"
source: https://www.bctengineer.com/q/semester_5/software_engineering/maintainability
site: BCT Engineering
---

# Maintenance types; design for maintainability

Software Engineering · Chapter 10: Configuration Management

- Asked in: 2068 Baishakh (old course), 10 marks
- Video: [Perfective, Preventive, Adaptive, Corrective Maintenance in Software Engineering](https://www.youtube.com/watch?v=nulFv99VBGs) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/software_engineering/maintainability
- Whole chapter: https://www.bctengineer.com/md/semester_5/software_engineering/chapter-10

## Question

What are the types of software maintenance? Give some design principles for maintainability.

## Short answer

The four types are corrective (fixing faults), adaptive (changing environment), perfective (new features/improvements), and preventive (improving future maintainability). Design for maintainability by applying modularity, high cohesion, low coupling, information hiding, abstraction, simplicity, DRY, configuration over hard-coding, coding standards, and testability.

## Answer

**Software maintenance** is the modification of software after delivery to correct faults, adapt it to a new environment, or improve it. Since maintenance often costs more than development, the design must make change easy.

#### Types of software maintenance

1. **Corrective maintenance**
   - Fixing faults found after delivery: coding, design or requirements errors.
   - Example: a payroll system calculates overtime wrongly; the formula is corrected.

2. **Adaptive maintenance**
   - Modifying the software to work in a changed environment: new hardware, operating system, database, or new laws and business rules.
   - Example: the payroll system is updated when the government changes the income tax slabs, or is moved to a cloud server.

3. **Perfective maintenance**
   - Adding new functions or improving performance and usability on user request. This is the largest share (about 50–65%) of maintenance effort.
   - Example: adding a feature to email payslips to employees.

4. **Preventive maintenance**
   - Improving the structure and documentation of the software to make future maintenance easier, without changing its behaviour.
   - Example: restructuring a large, complex salary module into smaller, documented functions.

| Type | Trigger | Share of effort (approx.) |
|---|---|---|
| Corrective | Faults | ~17–20% |
| Adaptive | Environment change | ~18–25% |
| Perfective | New requirements | ~50–65% |
| Preventive | Future maintainability | small |

#### Design principles for maintainability

**Maintainability** is how easily software can be understood, corrected, adapted and enhanced. The following design principles improve it:

1. **Modularity:** divide the system into small, well-defined modules so a change affects only one module.
2. **High cohesion:** each module does one clear job, so it is easy to understand and change.
3. **Low coupling:** modules depend on each other as little as possible, through simple interfaces, so a change does not spread.
4. **Information hiding and encapsulation:** hide internal data and design decisions inside modules; others use only the public interface.
5. **Abstraction and layering:** separate concerns into layers (presentation, business logic, data access), so for example the database can be replaced without changing the user interface.
6. **Simplicity:** prefer simple designs and keep complexity (such as cyclomatic complexity) low; avoid clever but obscure code.
7. **Avoid duplication (DRY):** keep each piece of logic in one place so a fix is made once.
8. **No hard-coded values:** keep tax rates, URLs and limits in configuration files or tables, so adaptive changes need no code change.
9. **Coding standards and meaningful names:** consistent style and clear names make code readable by others.
10. **Good documentation:** keep design documents, interface descriptions and comments up to date.
11. **Use design patterns and standard components:** well-known solutions are easier for new staff to understand.
12. **Design for testability:** provide automated unit and regression tests so changes can be checked quickly.
13. **Robust error handling:** check inputs and handle exceptions clearly, which makes faults easier to locate.

**Example:** if the payroll system keeps tax slabs in a database table and calculates tax in one separate module behind an interface, a change in tax law needs only a data update or a change to that single module.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which type of maintenance takes the largest share of effort and what is it?
   A. Corrective, fixing faults
   B. Perfective, adding features or improving performance on user request
   C. Adaptive, fixing bugs
   D. Preventive, adding new features
   Answer: B. Perfective maintenance is about 50-65% of effort and covers new features and improvements. (Key point: Perfective maintenance share)

2. Which design combination best improves maintainability?
   A. High coupling and low cohesion
   B. Low coupling and low cohesion
   C. High coupling and high cohesion
   D. Low coupling and high cohesion
   Answer: D. Low coupling stops changes spreading, and high cohesion makes each module easy to understand and change. (Key point: Coupling and cohesion)

3. Why should tax rates and limits be kept in configuration files or tables?
   A. Adaptive changes then need no code change
   B. It makes the program run faster
   C. It removes the need for testing
   D. It increases coupling
   Answer: A. Externalised values let adaptive changes be made by updating data rather than code. (Key point: No hard-coded values)

4. How does layering (presentation, business logic, data access) help maintainability?
   A. It removes the need for documentation
   B. It makes every module depend on all others
   C. It lets one layer, such as the database, be replaced without changing the user interface
   D. It increases code duplication
   Answer: C. Separating concerns isolates changes to one layer. (Key point: Layering and information hiding)

## Related in Software Engineering

- [Software maintenance and its types](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Amaintenance-types) — Software Engineering, chapter 10
- [Testing principles and testability](https://www.bctengineer.com/question.md?key=semester_5%2Fsoftware_engineering%3Atesting-principles) — Software Engineering, chapter 8

## Related in other subjects

- [Software maintenance and fixing common bugs](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Asw-maintenance-bugs) — Instrumentation II, chapter 9
- [Short note: principles of I/O software](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aio-software-principles-note) — Operating System, chapter 6
- [Principles of mix design; factors not in DOE](https://www.bctengineer.com/question.md?key=semester_5%2Fconcrete_technology_and_masonry_structure%3Amix-design-principles-doe-omitted) — Concrete Technology and Masonry Structure, chapter 3
- [Seismic design principles for masonry buildings](https://www.bctengineer.com/question.md?key=semester_5%2Fdesign_of_timber_and_masonry_structures%3Aseismic-design-principles-masonry) — Design of Timber and Masonry Structures, chapter 7
