AP CSA FRQ Guide
2019 FRQ 2: StepTracker
Write a complete StepTracker class. The class stores an active-day threshold, accepts one daily step reading at a time, tracks the number of active days, and reports the average steps per tracked day.
Skills Tested
What this FRQ is really practicing
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
- 1Write the complete class header, fields, and constructor.
- 2Store the minimum step threshold supplied to the constructor.
- 3Each call to addDailySteps should add one tracked day and update the total step count.
- 4Increase the active-day count when the daily steps are at least the threshold.
- 5Return 0.0 from averageSteps when no days have been recorded.
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
Self Check
Review questions before you submit
Defines the complete StepTracker class.
Question 2 asks for a full class implementation.
Declares fields for threshold, total steps, total days, and active days.
You need enough state to answer activeDays and averageSteps later.
Includes a constructor with one int threshold parameter.
The constructor sets the minimum steps needed for an active day.
Initializes stored state in the constructor.
Store the threshold and start counters at zero.
Defines addDailySteps as a void method with one int parameter.
This method records one day and does not return a value.
Adds the daily steps to a running total.
The average depends on total steps across all recorded days.
Increments the number of tracked days for every reading.
Every addDailySteps call represents one day.
Counts a day as active when steps meet or exceed the threshold.
Use >= so a day exactly at the threshold is active.
Practice Links
