2019 AP CSA FRQ 2: StepTracker Solution + Rubric

2019 AP CSA FRQ 2: StepTracker — Complete Solution & Rubric

Step-by-step solution to 2019 AP CSA FRQ 2 (StepTracker) with the official 9-point rubric, common mistakes that cost points, and a built-in 22-minute practice timer. Written by an AP Computer Science teacher whose students earn 5s at more than 2x the national rate.

Year: 2019 Question: 2 of 4 Points: 9 Topics: Class Writing, Constructors Difficulty: Medium
Recommended pace: 22:00 per FRQ 22:00

The Official 2019 FRQ 2 Question

The complete prompt is in the PDF below. Use the recap above the editor to keep the key requirements in mind while you write your response.

The PDF cannot be embedded on this device.

Open Prompt PDF in New Tab

Write Your StepTracker Response (Part A)

Read the prompt above and write your response in the editor. The real AP exam in Bluebook gives you the prompt and a blank editor — no requirement summary, no hints. Practice like that here. When you’re done, click Reveal Solution & Scoring Rubric below to compare your code against the official rubric.

Response.java Tab indents | Enter auto-indents | Brackets auto-close
Drag bottom-right corner to resize editor ⇲

Ready to self-grade? Compare your code against the official 9-point rubric below. AP FRQs are graded by trained human readers, so we don’t auto-score — you’ll learn more by checking your work against the rubric criteria yourself.

What the Prompt Was Asking

Before reading the solution, check whether your response covered each of these requirements:

Write: public class StepTracker

Required behavior:

  • Constructor that stores the active-day step threshold in an instance variable
  • addDailySteps method that updates total steps, day count, and active-day count
  • averageSteps method that returns 0.0 when no days are recorded (avoid integer division)

How to Write the StepTracker Class Step-by-Step

// REPLACE WITH YOUR SOLUTION CODE
// Preserve indentation. Use 4 spaces, never tabs.
public class StepTracker {
    private int minSteps;
    private int totalSteps;
    private int numDays;
    private int activeDays;

    public StepTracker(int minimum) {
        minSteps = minimum;
    }

    public void addDailySteps(int steps) {
        totalSteps += steps;
        numDays++;
        if (steps >= minSteps) {
            activeDays++;
        }
    }

    public int activeDays() {
        return activeDays;
    }

    public double averageSteps() {
        if (numDays == 0) return 0.0;
        return (double) totalSteps / numDays;
    }
}

Official 9-Point Scoring Rubric for StepTracker

Pts Criterion
+1 Class header: public class StepTracker
+1 Constructor stores the minimum threshold in an instance variable
+1 Constructor header declared public
+1 Instance variables track total steps, day count, active days
+1 addDailySteps header and updates total/days
+1 addDailySteps increments active days when threshold met
+1 activeDays returns the active-day count
+1 averageSteps handles zero-days edge case (returns 0.0)
+1 averageSteps avoids integer division

Common Mistakes That Cost Points on FRQ 2

Mistake 1: Storing averageSteps as an instance variable. The rubric expects it computed on demand from totalSteps and numDays - storing a redundant variable risks staleness and wastes a rubric line.
Mistake 2: Forgetting the (double) cast in averageSteps. Writing return totalSteps / numDays performs integer division and returns 0 for any case where totalSteps < numDays. Cast one operand: return (double) totalSteps / numDays.
Mistake 3: Skipping the numDays == 0 guard. Without it, averageSteps throws ArithmeticException on the very first sample call before any days are added.
Key Insight: When two methods share state (addDailySteps writes, averageSteps reads), the cleanest design uses simple int counters and computes derived values like the average on demand. This avoids storing redundant state that can drift out of sync.

FAQs About 2019 AP CSA FRQ 2

What does 2019 AP CSA FRQ 2 StepTracker test?

FRQ 2 tests writing a complete Java class with private instance variables, a constructor that stores a parameter, and methods that update and return state. The exam wants you to handle the zero-days edge case in averageSteps without integer division.

How many points is FRQ 2 worth?

9 points, awarded across the rubric criteria. FRQ 2 makes up about 11% of the AP CSA exam score.

What is the most common mistake on 2019 FRQ 2 StepTracker?

Forgetting to cast to double in averageSteps. Without (double) on one operand, Java performs integer division and you lose decimal precision, which costs the rubric point.

How long should I spend on FRQ 2?

Aim for 22 minutes per FRQ. The AP CSA free-response section is 90 minutes for 4 questions, so 22 minutes per question leaves a 2-minute buffer to review.

Is StepTracker still relevant for the 2026 AP CSA exam?

Yes. The current AP CSA 4-unit curriculum still tests class writing with constructors and instance variables, so StepTracker is excellent practice for the 2026 exam format.

Where can I find the official scoring guidelines?

College Board publishes the official scoring guidelines as a PDF on AP Central. The rubric on this page mirrors those criteria. You can download the official scoring guidelines here.

Related AP CSA FRQs to Practice Next

If you found StepTracker useful, work through these next to lock in the same Java concepts:

Why 2019 FRQ 2 Still Matters for the 2026 AP CSA Exam

The 2026 AP CSA curriculum reorganized the topic list into 4 units, but the FRQ types stayed the same. 2019 FRQ 2 (StepTracker) tests class writing with constructors and instance variables, which is still a core part of the exam. Practicing this question prepares you for the Bluebook digital test format and builds the muscle memory you need for the exam on Friday, May 15, 2026.

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]