Activity 01
Pair Debug: Bug Exchange
Students create a short OOP program with one intentional bug, such as a null reference or wrong method call. They exchange code with a partner, use the IDE debugger to set breakpoints and step through execution, then fix and explain the issue. Partners verify the fix runs correctly.
Analyze common types of errors encountered in OOP (e.g., null pointer exceptions, incorrect inheritance).
Facilitation TipDuring Pair Debug: Bug Exchange, insist students narrate each step out loud before they touch the keyboard, so partners can catch misconceptions early.
What to look forProvide students with a small, buggy object-oriented code snippet (e.g., a simple class with a method that causes a NullPointerException). Ask them to identify the specific line causing the error and explain why it occurs, using one debugger concept (e.g., breakpoint, step-through).