
Lesson 2-4: Debugging
36 | Chapter 2
Name __________________________________________ Date _______________________
Section _________________________________________
Exercise 1: Program Dinner (on file dinner) writes a dinner menu. Compile and run this
program. Be forewarned: Bugs are lurking in the code. The lines of the program are numbered on
the right in comments. Fill in the following chart, showing the errors and the steps you took to
correct them. (This time you do not get a printed copy; you must use the file only.) If the errors are
caused by missing code, explain what is missing in the Corrections column.
# OK Error Correction (if error)
1 ______ ...