You are not logged in. Lock_open    

Browse tutorials by Category - BlueJ

Array, Off By One Error (BlueJ) Time: 7:04 Gb
Average:
  • Currently 3.0/5 Stars from 161 ratings
  •  
  •  
  •  
  •  
  •  
161 ratings
Your Rating:
  • Currently 0.0/5 Stars from 161 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Array Loop Logic Error BlueJ
Description: click for more...

This video shows the problem of code that doesn’t produce the correct output because the loop has an off-by-one error when it processes the array to find an average.

Confusing And and Or (BlueJ) Time: 5:24 Gb
Average:
  • Currently 3.1/5 Stars from 166 ratings
  •  
  •  
  •  
  •  
  •  
166 ratings
Your Rating:
  • Currently 0.0/5 Stars from 166 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Conditional Loop Logic Error BlueJ
Description: click for more...

This video shows the incorrect uses of || (or) in a compound boolean expression to control a validation loop. The incorrect boolean expression matches with commonly used English “if the user doesn’t answer ‘yes’ or the user doesn’t answer ‘no’ then make them type in another answer.” This expression is complicated by the fact that the “not” is used in conjunction with .equals is harder to parse than, for example, !=.

Infinite Loop (BlueJ) Time: 6:41 Gb
Average:
  • Currently 3.1/5 Stars from 185 ratings
  •  
  •  
  •  
  •  
  •  
185 ratings
Your Rating:
  • Currently 0.0/5 Stars from 185 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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.

Java String Substring (BlueJ) Time: 10:14 Gb
Average:
  • Currently 3.0/5 Stars from 191 ratings
  •  
  •  
  •  
  •  
  •  
191 ratings
Your Rating:
  • Currently 0.0/5 Stars from 191 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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.

Missing Input Statement (BlueJ) Time: 3:12 Gb
Average:
  • Currently 3.1/5 Stars from 156 ratings
  •  
  •  
  •  
  •  
  •  
156 ratings
Your Rating:
  • Currently 0.0/5 Stars from 156 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Loop Logic Error BlueJ
Description: click for more...

This video shows an infinite loop that occurs due to a lack of an input statement inside a validation loop. A prompt and a scan is used before the loop, but the code inside the loop only has a prompt. It points out the infinite loop and shows the addition of a read statement to fix the problem.

Missing Semicolon ; (BlueJ) Time: 5:28 Gb
Average:
  • Currently 3.0/5 Stars from 160 ratings
  •  
  •  
  •  
  •  
  •  
160 ratings
Your Rating:
  • Currently 0.0/5 Stars from 160 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Compile Error Logic Error BlueJ
Description: click for more...

Small method demonstrating syntax error caused by a missing semi-colon.

Semi-colon expected (BlueJ) Time: 1:53 Gb
Average:
  • Currently 3.1/5 Stars from 162 ratings
  •  
  •  
  •  
  •  
  •  
162 ratings
Your Rating:
  • Currently 0.0/5 Stars from 162 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Compile Error BlueJ
Description: click for more...

This video demonstrates how to deal with a compiler error that does not seem to make sense. BlueJ shows a semi-colon expected error, but on a line number with a semi-colon.

String Index Out Of Bounds (BlueJ) Time: 7:23 Gb
Average:
  • Currently 3.0/5 Stars from 168 ratings
  •  
  •  
  •  
  •  
  •  
168 ratings
Your Rating:
  • Currently 0.0/5 Stars from 168 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
Categories: Runtime Error Logic Error Strings BlueJ
Description: click for more...

This video shows a StringIndexOutOfBoundsException caused by indexing beyond the end of a String. This happens in a nested loop, where the inner loop should stop at the end of a word. However, when the end of the string is reached, an erorr is thrown.

Using the BlueJ Debugger (BlueJ) Time: 14:52 Gb
Average:
  • Currently 3.0/5 Stars from 168 ratings
  •  
  •  
  •  
  •  
  •  
168 ratings
Your Rating:
  • Currently 0.0/5 Stars from 168 ratings
  • 1
  • 2
  • 3
  • 4
  • 5
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.