AP CSA FRQ Guide

2020 FRQ 1: Gizmo

Work with an online purchase list of Gizmo objects: count electronic purchases by maker, detect adjacent equal purchases, and describe a class-design change.

ArrayList and Object Analysis25 minute targetArrayListobjectsequalsadjacent pairs

Skills Tested

What this FRQ is really practicing

ArrayListobjectsequalsadjacent pairs

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 without copying a solution

  1. 1Part A: traverse purchases and count objects that are both electronic and from the requested maker.
  2. 2Part B: compare adjacent purchases using the Gizmo equals method.
  3. 3Part C: explain what state and method logic would be needed to support cheapest-by-maker.

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

Counting every Gizmo from a maker without checking whether it is electronic.
Using == instead of equals for adjacent object equivalence.
Looping through purchases.size() and then accessing k + 1 out of bounds.
Describing getCheapestGizmoByMaker without adding any way for Gizmo to store or expose price.

Self Check

Review questions before you submit

Checks both maker and electronic status.

Both conditions must be true before counting a Gizmo.

Uses equals for adjacent Gizmo comparison.

Do not use == for object equivalence in this prompt.

Compares each item with the next item.

Loop only through size - 2 so k + 1 is valid.

Written response mentions price state and a cheapest search.

The design change needs a price field/accessor and comparison logic.

Practice Links

Where to go next