AP CSA Exam Center

Tracing, debugging, MCQ preparation, and FRQ practice organized by AP task type.

AP Exam Center

This section is for assessment practice rather than new instruction. Use it after students have worked through the unit pages.

Code Tracing

Trace variables, loops, method calls, arrays, ArrayLists, and objects. Require students to show a table of values.

Debugging

Find the bug, explain the bug, and fix the bug. The explanation matters as much as the correction.

FRQ Library

Organized by Methods, Classes, ArrayLists, and 2D Arrays.

FRQ Types

TypeWhat Students WriteCommon Mistakes
Methods & ControlMethods using conditionals, loops, accumulators, and helper methods.Missing return values, wrong loop bounds, integer division.
Class DesignInstance variables, constructors, methods, and toString.Forgetting private fields, constructor errors, direct field access.
ArrayListSearch, filter, remove, insert, and rank objects.Skipping elements after removal, using array syntax.
2D ArrayNested loop traversal, row/column totals, grid searches.Confusing rows and columns.

Practice Set Starters

Tracing: Loops

int total = 0;
for (int i = 1; i <= 4; i++) {
    total += i * 2;
}
System.out.println(total);

Answer: 20.

Debugging: ArrayList Removal

for (int i = 0; i < list.size(); i++) {
    if (list.get(i) < 0) {
        list.remove(i);
    }
}

Problem: removing while moving forward can skip values. Fix by moving backward or decrementing i after removal.