AP CSA FRQ Guide

2013 FRQ 1: MusicDownloads

Search a music download list by title and update counts, creating new records when a title has not appeared before.

ArrayList Search and Update22 minute targetArrayListobjectssearchmutation

Skills Tested

What this FRQ is really practicing

ArrayListobjectssearchmutation

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. 1Find and return the DownloadInfo object for a title, or null if it is missing.
  2. 2For each downloaded title, increment an existing count or add a new DownloadInfo object.

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

Returning null after the first nonmatching record.
Adding a duplicate record instead of incrementing an existing record.
Forgetting to process every title in the input list.

Self Check

Review questions before you submit

Searches the download list by title.

Call the title accessor on each DownloadInfo object.

Returns null when no matching title exists.

Do this after the search completes.

Updates existing download records.

The archive class provides a way to increment count.

Adds a new record for a title not already stored.

Construct a new DownloadInfo only when getDownloadInfo returns null.

Practice Links

Where to go next