• Whitebox or structural testing . Such testing requires developing test cases
while looking at the program itself. Enough test cases should be included so that
test coverage is provided: every statement is executed at least once during test-
ing. Also, test cases should be developed to look at boundary conditions (e.g.
execution of a loop that performs 0 iterations, 1 iteration, or the maximum num-
ber of iterations).
• Suites of test cases . For a larger program, develop a suite of test cases and test
them all whenever changes are made. If possible, write the test driver so that it
does the testing automatically and prints out messages only when the answers are
• Debugging . Debugging is the process of finding and removing errors once they
have been detected. When looking for an error, use Java assert statements, judi-
ciously placed print statements, and perhaps the debugging tool of your IDE to
help you track down the errors.