Software Development and Project Management

In agile development methods such as Extreme Programming (XP), what is the activity of reorganizing the internal structure of a program so that it is easier to understand and change, without changing its externally visible behavior?

  1. APair programming
  2. BReverse engineering
  3. CRefactoring
Show answer and explanation

Answer: C. Refactoring

Refactoring improves the structure of code without changing its function, for example by merging duplicated code, splitting long functions and choosing clearer names. To confirm that the behavior has not changed, automated tests are prepared and run after each small change. Pair programming is an XP practice in which two people write a program together at one computer. Reverse engineering is analyzing an existing program to uncover its specification and design.

  • A. This is an XP practice in which two people write a program together at one computer, one typing and the other reviewing.
  • B. This is analyzing an existing program or binary to uncover its specification and design.
  • C. Correct. The structure of the code is improved while its externally visible behavior is kept.
Practice this topic Back to topic

Related calculators

Books on Software Development and Project Management Ad

As an Amazon Associate I earn from qualifying purchases.

More Software Development and Project Management questions

  1. Which describes how test-driven development (TDD) proceeds?
  2. Which describes continuous integration (CI)?
  3. Which correctly describes the difference between continuous delivery and continuous deployment?
  4. Which of the following requirements for a business system is a non-functional requirement?
  5. In UML, which diagram is suitable for showing how the state of an object changes in response to events (a button press, a timer expiring, a temperature being reached and so on), as in the control software of a rice cooker?