Browse tutorials by Category - Debugging Process
Infinite Loop (BlueJ)
Time: 6:41
|
|
| Average: 62 ratings | Your Rating: |
| Categories: Loop Logic Error Debugging Process BlueJ | |
| Description: click for more...
Shows an infinite loop that occurs due to lack of update of a loop iterator inside an if statement in the loop. It identifies that an infinite loop is happening when the program does not seem to end. It then shows how to insert print statements to output the iterator value at the beginning of the loop, and then again at the end of the loop. |
|
Infinite Loop (Eclipse)
Time: 5:09
|
|
| Average: 49 ratings | Your Rating: |
| Categories: Loop Logic Error Debugging Process Eclipse | |
| Description: click for more...
Shows an infinite loop that occurs due to lack of update of a loop iterator inside an if statement in the loop. It identifies that an infinite loop is happening when the program does not seem to end. It then shows how to insert print statements to output the iterator value at the beginning of the loop, and then again at the end of the loop. |
|
Java String Substring (BlueJ)
Time: 10:14
|
|
| Average: 63 ratings | Your Rating: |
| Categories: Strings Debugging Process BlueJ | |
| Description: click for more...
This video demonstrates a logic error where the program runs to completion, but produces the wrong output. The process of identifying, finding, and fixing the error is modeled. The error stems from the incorrect use of a formula to control the parameters of the subString method. The code attempts to throw away occurrences of the strings “cat” and “dog” as they are counted – but makes a mistake in doing so. The code is analyzed, corrected, and tested. |
|
Linear Search of an Array (Eclipse)
Time: 9:08
|
|
| Average: 50 ratings | Your Rating: |
| Categories: Conditional Array Loop Logic Error Debugging Process Eclipse | |
| Description: click for more...
This video shows a program which is searching through an array, in a linear fashion, looking for a value. It has an if…else statement within a loop which assigns a boolean value to a variable called “found” every iteration of the loop (if theArray[index] == value). It shows that the code works for any value not in the array, but that it always reports “found” to be false, even for values that are in the array. By inserting print statements at the start of the if block and then in the else block, it shows that “found” is updated every iteration of the loop, potentially overwriting the assignment of true to “found.” |
|
Using the BlueJ Debugger (BlueJ)
Time: 14:52
|
|
| Average: 45 ratings | Your Rating: |
| Categories: Debugging Process BlueJ | |
| Description: click for more...
This video seeks to demonstrate how to use the BlueJ debugger to set a breakpoint, watch the values of variables, step through code, and use continue to reach the next breakpoint. The video starts with a basic calculator program that has a nested loop to allow the calculator to run multiple times. The three bugs are: the operator is read, but not reset at the end of the inner loop, the program doesn’t ask for the user to “play again” — and does so automatically, and the “answer” of an expression is not reset to zero each time you start a new expression — causing multiple expression evaluations to report the cumulative sum of all expressions evaluated. |
|
Using the Eclipse Debugger (Eclipse)
Time: 3:20
|
|
| Average: 54 ratings | Your Rating: |
| Categories: Debugging Process Eclipse | |
| Description: click for more...
A short tutorial on the basics of how to use the debugger to debug a program in Eclipse. |
|