Order a controlled repair

A student investigates an incorrect library loan fee. The calculation contains one suspicious update, but its inputs and output have not yet been inspected. Arrange the following actions into a coherent investigation, making one source-code change only after observing evidence for it.

  1. 1.

    Advance across the update and compare its actual result with the result predicted from those values.

  2. 2.

    Rerun the original case and relevant boundary cases using the edited source code.

  3. 3.

    Change the single operation supported as faulty by the comparison.

  4. 4.

    Reproduce the failure and record the input, starting conditions, expected fee, and actual fee.

  5. 5.

    Pause immediately before the suspicious update and inspect the values it will use.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Debugging Strategies Questions: