AP CSA FRQ Guide
2026 FRQ 4: GameBoard
Write the GameBoard method getPointsForRow, which sums the point values of the Space objects in a given row, doubling the sum if every space in that row is the same color.
Skills Tested
What this FRQ is really practicing
Treat these skills as the study checklist. If any tag feels shaky, review that topic before attempting the full written response.
Starter Approach
How to begin with your own plan
- 1Loop across board[targetRow] to sum every Space object's point value.
- 2While summing, track whether every space in the row shares the same color as the first space.
- 3Return the sum, or two times the sum if every space in the row was the same color.
Write a first attempt before revealing any solution outline. Most AP CSA FRQ progress comes from tracing your own code and finding the missing case.
Common Mistakes
Mistakes to watch for while writing
Self Check
Review questions before you submit
Iterates across board[targetRow].
Use a loop with board[targetRow].length as the bound.
Adds each space's getPoints() to a running sum.
Call getPoints() on each Space in the row.
Compares each space's getColor() to check whether the whole row matches.
Use .equals(...) to compare color Strings, not ==.
Tracks whether every space so far has matched, e.g. with a boolean flag.
Set a boolean to false as soon as one space has a different color.
Doubles the sum when all spaces in the row are the same color.
Multiply the sum by 2 only inside the all-same-color branch.
Returns the sum (doubled or not).
The method must return an int.
Practice Links
