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.
Skills Tested
What this FRQ is really practicing
Review these topics before attempting the problem.
Starter Approach
How to begin with your own plan
- 1Part A: traverse purchases and count objects that are both electronic and from the requested maker.
- 2Part B: compare adjacent purchases using the Gizmo equals method.
- 3Part C: explain what state and method logic would be needed to support cheapest-by-maker.
Attempt the problem before opening the solution.
Common Mistakes
Mistakes to watch for while writing
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
