Fiveable

💻AP Computer Science A Review

QR code for AP Computer Science A practice questions

FRQ 3 – Data Analysis with `ArrayList`

FRQ 3 – Data Analysis with `ArrayList`

Written by the Fiveable Content Team • Last updated June 2026
Verified for the 2027 exam
Verified for the 2027 examWritten by the Fiveable Content Team • Last updated June 2026
💻AP Computer Science A
Unit & Topic Study Guides
Pep mascot

Overview

AP CSA FRQ 3 is the Data Analysis with ArrayList question, worth 5 of the 25 points in the free-response section. You'll be given a scenario with one or more pre-written classes and asked to write a single method that uses, analyzes, and manipulates data stored in an ArrayList. The free-response section as a whole gives you 90 minutes for 4 questions and counts for 45% of your AP Computer Science A exam score.

The typical FRQ 3 task: traverse an ArrayList of objects, filter elements based on one or more conditions, and calculate something (a count, sum, average, maximum, or minimum). You never have to build the ArrayList yourself. It already exists as an instance variable in the class you're given. Your job is to loop through it correctly, call methods on the objects inside, and return the right value.

One more thing worth knowing: this question now tests ArrayList exclusively. Plain arrays were removed from FRQ 3, so every elements-access in your answer should use ArrayList methods like get() and size(), never bracket syntax.

How AP CSA FRQ 3 Is Scored

FRQ 3 is worth 5 points, the smallest point total of the four FRQs (Question 1 and Question 2 are worth 7 each, and FRQ 4 on 2D arrays is worth 6). Based on how past ArrayList questions have been graded, the 5 points tend to map onto five distinct skills:

PointWhat typically earns it
TraversalA loop that accesses every element of the ArrayList without going out of bounds, and actually accesses elements inside the loop
Method calls on elementsCalling at least one method on an object pulled from the list (like item.getCost()), not just on the list itself
Condition checkingCorrect boolean logic for the filtering criteria, including the right operators for inclusive vs. exclusive bounds
Accumulating valuesDeclaring, initializing, and correctly updating tracking variables (sum, count, max, min) inside the loop
AlgorithmThe whole solution works together: correct calculation, correct return type, correct final answer

Treat this table as a strategy map rather than the official rubric for any specific question, since each exam's scoring guidelines vary slightly. But the pattern is remarkably consistent.

The algorithm point is more forgiving than you'd expect. Graders evaluate whether your overall approach would work, so a sound algorithm with a minor syntax slip elsewhere can still earn it. That cuts both ways, though: a beautifully written loop that divides by list.size() when it should divide by a filtered count will lose the algorithm point even with flawless syntax.

How to Approach FRQ 3, Step by Step

The logic in FRQ 3 is usually simple. The real test is whether you can execute clean ArrayList syntax under time pressure. Budget roughly 20 minutes for this question and follow a consistent process.

Read the provided code first (about 5 minutes)

Before writing anything, inventory what you've been given. FRQ 3 usually provides a simple class with getter methods (something like ItemInfo with getCost() and isAvailable()) plus a second class containing an ArrayList of those objects. The method you write always lives in the second class.

Two things to check during this read:

  1. Which methods exist, and what do they return? You can only call methods that appear in the provided code, and only the public ones. Inventing a method that doesn't exist costs points.
  2. What exactly does the question ask you to return? An average and a sum look similar mid-loop but produce different final lines. Note whether bounds are inclusive ("between low and high, inclusive" means >= and <=) or exclusive.

Write the solution (10-12 minutes)

FRQ 3 solutions are typically 10-15 lines of actual code. If you're writing much more than that, step back. You're probably overcomplicating it.

The single most important syntax rule: ArrayList access uses get(), not brackets. arr[i] works on arrays; list.get(i) works on an ArrayList. Mixing these up is the most common point-loser on this question, and graders are specifically watching for it.

Remember the two-step process for working with elements. When you call list.get(i), you get back a reference to an object. You then call methods on that object to read its data. So a condition check looks like list.get(i).getCost() >= minPrice, or you store the element first: ItemInfo item = list.get(i); then item.getCost(). An enhanced for loop (for (ItemInfo item : inventory)) handles the "get the element" step for you and is often the cleaner choice when you're only reading data.

Keep your tracking variables synchronized. If an element passes your filter, update everything that depends on it in the same if block. Counting an item but forgetting to add its value to the sum (or vice versa) is one of the most common logic errors on this question.

Verify (about 5 minutes)

Use your last few minutes to catch the classics: array brackets where get() belongs, an uninitialized accumulator (double sum; with no = 0.0;), && vs. || mix-ups, and off-by-one loop bounds. Most importantly, reread the prompt. Did they ask for an average or a sum? Should the return type be double or int? These last-minute catches routinely save multiple rubric points.

If you're still working on FRQ 3 after 25 minutes, move on. A partially complete FRQ 4 earns more points than a perfected FRQ 3.

Worked Example: The Filter-and-Average Pattern

Here's an editorial example of the most common FRQ 3 structure. Suppose you're given an ItemInfo class with public methods isAvailable() (returns boolean) and getCost() (returns double), and asked to write a method that returns the average cost of available items priced between low and high, inclusive. A solution following the pattern:

</>Java
public double averageInRange(double low, double high)
{
    double sum = 0.0;
    int count = 0;
    for (ItemInfo item : inventory)
    {
        if (item.isAvailable() && item.getCost() >= low
                               && item.getCost() <= high)
        {
            sum += item.getCost();
            count++;
        }
    }
    return sum / count;
}

Walk through how this maps to the scoring pattern:

  • The enhanced for loop accesses every element (traversal point).
  • item.isAvailable() and item.getCost() are method calls on elements from the list (method-call point).
  • The compound condition uses && because both criteria must be true, and >= / <= because the bounds are inclusive (condition point).
  • sum and count are both initialized before the loop and updated together inside the same if block (accumulation point).
  • The return divides by count, the number of items that passed the filter, not by inventory.size() (algorithm point).

That last distinction is the trap baked into nearly every average-style FRQ 3. Dividing by the list's full size when only some items qualify gives the wrong answer and loses the algorithm point.

FRQ 3 Patterns Worth Recognizing

A small set of patterns covers most FRQ 3 questions, so recognizing them on sight is the fastest way to earn these 5 points.

The "filter by multiple criteria" pattern is the most common. The first criterion is usually a boolean method like isAvailable() or isActive(). The second compares a numeric value against bounds passed as parameters. Both conditions must be true, so you almost always want &&. Be careful here: in everyday English we say "items that are available or under $50" when we logically mean both. Test writers know this and count on the || mistake.

The "accumulate and calculate" pattern pairs with it. You're rarely asked to just count things. More often you maintain a sum and a count together to compute an average, or track a running max or min. For max/min problems, initialize your tracker to the first qualifying value or use a sentinel carefully. Initializing max to 0 fails if all values are negative.

The method signature itself is predictable: one or two parameters defining the filter criteria, returning a calculated value. You're analyzing the data, not modifying it. If your solution calls remove() or set(), reread the prompt, because FRQ 3 almost never asks you to change the list.

Common Mistakes

  • Using array brackets on an ArrayList. Writing inventory[i] instead of inventory.get(i) is the number-one syntax error on this question. Drill get() until it's automatic.
  • Calling methods on the list instead of its elements. inventory.size() doesn't demonstrate that you can work with the objects inside. Pull an element out first, then call its methods.
  • Dividing by the wrong count. For a filtered average, divide by the number of items that passed your conditions, not list.size(). This single error costs the algorithm point.
  • Uninitialized accumulators. double sum; without = 0.0; won't compile in this context. Always initialize sum to 0 and count to 0 before the loop.
  • Wrong boundary operators. "Inclusive" means >= and <=. Using strict > and < silently excludes the endpoints and loses the condition point.
  • Inventing methods that don't exist. Only call methods shown in the provided classes. Spend your first read confirming exactly what's available.

If you're stuck mid-exam, write the loop, access elements with get() or an enhanced for loop, call one method on an element, and attempt some calculation. Even imperfect logic can earn 3 of the 5 points on the mechanical rows, and that partial credit adds up across the section.

Practice and Next Steps

The fastest way to make ArrayList syntax automatic is repetition under realistic conditions. Start with FRQ practice with instant scoring to get immediate feedback on traversal, filtering, and accumulation, then browse the full FRQ question bank to see how many variations of the filter-and-calculate pattern actually exist. Working through past exam questions shows you exactly how College Board phrases bounds, conditions, and return requirements.

Since FRQ 3 and FRQ 4 share the traverse-and-analyze structure, review the FRQ 4 2D Array guide next so you can move between list and grid traversal without missing a beat. When you're ready to put it all together, take a full-length practice exam with the real 90-minute FRQ timing, and use the rest of the AP Computer Science A exam prep collection to round out the other three FRQ types and the multiple-choice section.

Frequently Asked Questions

How many points is AP CSA FRQ 3 worth?

FRQ 3, the Data Analysis with ArrayList question, is worth 5 of the 25 points in the free-response section. It's the smallest FRQ on the exam (FRQ 1 and FRQ 2 are 7 points each, FRQ 4 is 6), which makes it one of the quickest point opportunities on the test.

What does AP CSA FRQ 3 ask you to do?

FRQ 3 gives you a scenario with pre-written classes and asks you to write one method that uses, analyzes, and manipulates data in an ArrayList. The typical task is traverse-filter-calculate: loop through the list, check conditions on the objects inside, and return a count, sum, average, max, or min.

Do you use array syntax or ArrayList syntax on FRQ 3?

ArrayList syntax only. get(i), never brackets like arr[i].

How long should you spend on FRQ 3?

About 20 minutes is a reasonable budget: roughly 5 minutes reading the provided classes, 10-12 minutes writing your method, and 5 minutes verifying. You have 90 minutes total for all 4 FRQs.

Why can't you divide by list.size() when calculating an average on FRQ 3?

Because most FRQ 3 averages only include items that pass a filter, so you have to divide by the count of qualifying items, not the full list size. size() gives the wrong answer and costs you the algorithm point.

Pep mascot
Upgrade your Fiveable account to print any study guide

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Click below to go to billing portal → update your plan → choose Yearly→ and select "Fiveable Share Plan". Only pay the difference

Plan is open to all students, teachers, parents, etc
Pep mascot
Upgrade your Fiveable account to export vocabulary

Download study guides as beautiful PDFs See example

Print or share PDFs with your students

Always prints our latest, updated content

Mark up and annotate as you study

Plan is open to all students, teachers, parents, etc
report an error
description

screenshots help us find and fix the issue faster (optional)

add screenshot