- 2068 Baishakh (old course) · 10 marks
Maintenance types; design 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.
What are the types of software maintenance? Give some design principles for maintainability.
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
-
Corrective maintenance
- Fixing faults found after delivery: coding, design or requirements errors.
- Example: a payroll system calculates overtime wrongly; the formula is corrected.
-
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.
-
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.
-
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:
- Modularity: divide the system into small, well-defined modules so a change affects only one module.
- High cohesion: each module does one clear job, so it is easy to understand and change.
- Low coupling: modules depend on each other as little as possible, through simple interfaces, so a change does not spread.
- Information hiding and encapsulation: hide internal data and design decisions inside modules; others use only the public interface.
- 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.
- Simplicity: prefer simple designs and keep complexity (such as cyclomatic complexity) low; avoid clever but obscure code.
- Avoid duplication (DRY): keep each piece of logic in one place so a fix is made once.
- No hard-coded values: keep tax rates, URLs and limits in configuration files or tables, so adaptive changes need no code change.
- Coding standards and meaningful names: consistent style and clear names make code readable by others.
- Good documentation: keep design documents, interface descriptions and comments up to date.
- Use design patterns and standard components: well-known solutions are easier for new staff to understand.
- Design for testability: provide automated unit and regression tests so changes can be checked quickly.
- 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.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Software maintenance and its types · Software Engineering, chapter 10
- Testing principles and testability · Software Engineering, chapter 8
- Software maintenance and fixing common bugs · Instrumentation II, chapter 9
- Short note: principles of I/O software · Operating System, chapter 6
- Principles of mix design; factors not in DOE · Concrete Technology and Masonry Structure, chapter 3
- Seismic design principles for masonry buildings · Design of Timber and Masonry Structures, chapter 7