CSC 216 F09/Debugging Scavenger Hunt: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Debugging Scavenger Hunt== | ==Debugging Scavenger Hunt== | ||
By: Steven Loudermilk and Shane | By: Steven Loudermilk and Shane Oaks | ||
===Introduction=== | ===Introduction=== |
Latest revision as of 05:00, 18 November 2009
Debugging Scavenger Hunt
By: Steven Loudermilk and Shane Oaks
Introduction
This exercise will help students get used to debugging and the debugging techniques/processes of many IDEs. It also gives students a realistic task that they will most likely come across during their programming career. However, it is best utilized once students are familiar with the basics of a debugging environment, not as an introduction.
Materials
For this exercise, you will need:
-The source code of a rigged program
-Java IDE
How To Play
Students are given the source code to a program. The code will contain comments that explain the intended function of the variables, methods, etc., however will have many different kinds of errors. From this, they are given the task of finding the errors, and correcting them. The first team that can produce the intended output wins!
Source Code
The source code should have errors that deal with many different types of debugging problems, for example:
-A loop where the second-to-last run produces a division by zero. In order to make this more difficult to detect, have the loop contain a trig function (sin(x), cos(x), etc)
-A function that calls a variable in another class that is declared as private
-A GUI where one of the elements isn't lined up correctly
-An arrayOutOfBounds() exception
-etc.