AP CSA FRQ Guide

2010 FRQ 1: MasterOrder

Calculate total cookie boxes across orders and remove all orders for a specified variety while returning the total removed boxes.

ArrayList Aggregation and Removal22 minute targetArrayListobjectsaggregationremoval

Skills Tested

What this FRQ is really practicing

ArrayListobjectsaggregationremoval

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. 1Sum box counts from every CookieOrder in the list.
  2. 2Remove matching varieties and accumulate the number of boxes removed.

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 removed orders instead of removed boxes.
Skipping adjacent matching orders in a forward removal loop.
Using == for cookie variety comparison.

Self Check

Review questions before you submit

Sums boxes across all orders.

Call the CookieOrder accessor for number of boxes.

Compares cookie variety names correctly.

Use equals for String values.

Removes all matching varieties.

Avoid skipping items after removal.

Returns the total boxes removed.

The return value is a box count, not the number of removed orders.

Practice Links

Where to go next