AP CSA FRQ Guide

2026 FRQ 2: Bottle

Write a complete Bottle class that tracks the amount of liquid remaining after each use, refilling to capacity whenever a use would drop the amount below 25% of capacity.

Class Writing and State Tracking22 minute targetclass writingconstructorsdoubleconditionalsstate tracking

Skills Tested

What this FRQ is really practicing

class writingconstructorsdoubleconditionalsstate tracking

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 with your own plan

  1. 1Write the complete class header, instance variables, and constructor. Bottles are filled to capacity when constructed.
  2. 2Implement updateAmount to subtract amountUsed from the current amount.
  3. 3Refill the bottle to capacity whenever the updated amount would drop below 25% of capacity, then return the current amount.

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

Comparing the used amount to 25% of the CURRENT amount instead of 25% of capacity.
Refilling before subtracting amountUsed instead of after.
Using <= instead of < for the threshold check — the official example shows exactly 25% of capacity does NOT trigger a refill, only strictly less than 25% does.
Forgetting to return the value after refilling, so the method returns the pre-refill amount instead of capacity.

Self Check

Review questions before you submit

Uses the correct public class header.

Define the complete Bottle class.

Declares instance variables for capacity and the current amount.

Store both the fixed capacity and the amount that changes over time.

Includes a constructor with a double capacity parameter that fills the bottle.

The starting amount should equal capacity.

Subtracts amountUsed from the current amount.

Update the amount field by subtracting the parameter.

Compares the updated amount to 25% of capacity.

Use 0.25 times capacity as the refill threshold.

Resets the amount to capacity when the threshold is crossed.

Assign capacity back to the amount field inside the if branch.

Returns the current amount after updating.

The method returns a double representing the amount remaining.

Practice Links

Where to go next