AP CSA FRQ Guide

2015 FRQ 4: NumberGroup

Define a number-group interface, implement a range, and check whether any stored group contains a value.

Interface and Range Reasoning22 minute targetinterfaceclasseslistsboolean logic

Skills Tested

What this FRQ is really practicing

interfaceclasseslistsboolean logic

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. 1Write an interface with one boolean contains method.
  2. 2Write a Range class with inclusive minimum and maximum bounds.
  3. 3Search a list of groups and return true if any group contains the value.

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

Leaving contains out of the interface.
Using exclusive bounds for the Range class.
Returning false after checking only the first group.

Self Check

Review questions before you submit

Declares a boolean contains method in the interface.

The interface has exactly one method.

Stores minimum and maximum range bounds.

The Range object needs both endpoints.

Checks inclusive lower and upper bounds.

Both endpoints are part of the range.

Searches each NumberGroup in groupList.

Return true as soon as one group contains the number.

Practice Links

Where to go next