ITPEC FE Subject A October 2025 Question 39
Which of the following is refactoring in software development activities?
Explanation
Modifying the internal structure to improve maintainability without changing the external specifications — that is refactoring.
Refactoring rewrites code to make it cleaner, for example removing duplication, splitting long functions or renaming, while the program's observable behaviour stays exactly the same. It is a core practice of agile methods such as XP, usually backed by automated tests that confirm nothing changed from the outside.
Answer (a)
Why not others:
- •(b) — two programmers coding one program together is pair programming.
- •(c) — building an early version to get user feedback is prototyping.
- •(d) — writing test cases before the code is test-driven development (test first).
Key rule: Refactoring changes structure, never behaviour; if the external specification changes, it is new development, not refactoring.
Software Development Management Techniques · AI-written, may contain errors
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.