ITPEC IP April 2026 Question 50
ITPEC IP April 2026 — Question 50 of 100
Refactoring — improving code structure while preserving externally observable behavior.
Typical refactorings remove duplication, clarify names, split long functions, and simplify dependencies. Tests confirm that behavior remains unchanged while maintainability improves.
Answer (d)
Why not others: (a) writes tests before implementation; (b) has two developers work together; (c) analyzes an existing system to recover its design or specifications. None specifically means behavior-preserving restructuring.
Key rule: Refactoring changes how code is organized, not what users observe it doing.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
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 IP past-paper collection or Report an issue.