AP® Computer Science Principles

Free Version

Upgrade subject to access all content

Easy

Debugging Strategies

APCSP-E4I4YU

Eli is testing his code and notices that one of his procedures does not work. The procedure is long and uses many helper procedures.

Which of the following strategies would help him debug his code?

Select TWO answers.

A

Try creating the procedure from scratch in a different manner.

B

Write comments in the code to clarify what each part does.

C

Check each helper procedure individually to ensure that they work on their own.

D

Start rewriting the procedure from the beginning, testing it after each portion of the code to make sure each step works before continuing.