CMPS-3350 Software Engineering
Week-2 lab exercise
The lab2.cpp program we wrote together in class has a bug. Some students saw the bug as a giant particle moving. Debugging steps... 1. See the bug when you run the program and create new particles. 2. Locate the line of code causing the bug. 3. Correct the code causing the bug. 4. Test your fixes. How to fix... 1. Save the old code in a program comment. 2. Make your correction to the code just below your comment. Hints: The bug is in some of the last code we wrote. The bug is caused by a boundary error.