Developing Applications and Automating Workflows Using Cisco Platforms (DEVASC) — Question 538
Why is refactoring done during test-driven development?
Answer options
- A. to enable larger objects and longer methods
- B. to improve maintainability and readability
- C. to ensure that the previous uses of the objects are explained
- D. to ensure the duplication of essential code
Correct answer: B
Explanation
Refactoring is primarily aimed at improving the maintainability and readability of the code, which makes it easier to work with in the long run. Options A, C, and D do not reflect the intent of refactoring; instead, they suggest practices that could lead to increased complexity and confusion in the codebase.