AP CSA Units, Weighting, and Study Plan
Below is a breakdown of the 10 units covered in AP Computer Science A, their corresponding study resources, and AP exam weightings (as published by College Board).
| Unit | Topic | Study Resource | AP Exam Weight (%) |
|---|---|---|---|
| 1 | Primitive Types | Unit 1: Getting Started | 2.5–5% |
| 2 | Using Objects | Unit 2: Using Objects | 5–7.5% |
| 3 | Boolean Expressions and If Statements | Unit 3: If Statements | 15–17.5% |
| 4 | Iteration (Loops) | Unit 4: Iteration | 17.5–22.5% |
| 5 | Writing Classes | Unit 5: Writing Classes | 5–7.5% |
| 6 | Arrays | Unit 6: Arrays | 10–15% |
| 7 | ArrayList | Unit 7: ArrayList | 2.5–7.5% |
| 8 | 2D Arrays | Unit 8: 2D Arrays | 7.5–10% |
| 9 | Inheritance | Unit 9: Inheritance | 5–10% |
| 10 | Recursion | Unit 10: Recursion | 5–7.5% |
Study Strategy:
- Focus more time on heavily weighted units like Iteration, Conditionals, and Arrays.
- Use CSAwesome to review concepts, take coding challenges, and reinforce understanding.
- Practice FRQs from past AP exams for application and retention.
- Use AI and online videos to get guidance to code and to learn each step, instead of having it write it out
- I also watched Bill Barnum’s AP CSA units videos, and have them organized here:
| Unit | Topic | Study Video |
|---|---|---|
| 1 | Primitive Types | Watch Unit 1 |
| 2 | Using Objects | Watch Unit 2 |
| 3 | Boolean Expressions and If Statements | Watch Unit 3 |
| 4 | Iteration (Loops) | Watch Unit 4 |
| 5 | Writing Classes | Watch Unit 5 |
| 6 | Arrays | Watch Unit 6 |
| 7 | ArrayList | Watch Unit 7 |
| 8 | 2D Arrays | Watch Unit 8 |
| 9 | Inheritance | Watch Unit 9 |
| 10 | Recursion | Watch Unit 10 |
MC Practice
Previous MC
AP CSA MC process and learnings
Focus Areas
- Unit 1: Review variable types, casting, and expressions.
- Unit 2: Practice object instantiation and method calls.
- Unit 7: Work on ArrayList methods and common indexing mistakes.
Strengths
Strong performance in classes, arrays, iteration, recursion, and inheritance.
AP CSA FRQ Breakdown: Hailstone Sequence
1. The Official Question
You will implement 3 static methods in a Hailstone class that deal with a mathematical sequence called the Hailstone sequence.
The sequence is defined as:
- If
n == 1, the sequence ends. - If
nis even → next =n / 2 - If
nis odd → next =3n + 1
Part (a) — hailstoneLength(int n)
Return the number of terms in the hailstone sequence starting at n.
Ex: hailstoneLength(5) → 6 because the sequence is 5, 16, 8, 4, 2, 1.
Part (b) — isLongSeq(int n)
Return true if the sequence is long, meaning its length is greater than the starting value.
Ex: isLongSeq(5) → true because 6 > 5.
isLongSeq(8) → false because 4 ≤ 8.
Part (c) — propLong(int n)
Return the proportion of long sequences from 1 through n.
Use isLongSeq in your implementation.
Ex: propLong(10) → 0.5 because 5 of the first 10 numbers produce long sequences.
2. Approaching the problem
- Use loops over recursion to avoid stack overflow and make it easier to count steps.
- In part (a), loop until
n == 1, updatingnbased on parity. - In part (b), call
hailstoneLength(n)and compare the result ton. - In part (c), use a counter and loop from 1 to
n, checkingisLongSeq(i). Returncount / (double) nfor the proportion. - Avoid hardcoding values. Your methods should work for any
n > 0.
3. Breakdown of Requirements
| Part | Method | Input | Output | Key Concept |
|---|---|---|---|---|
| (a) | hailstoneLength(int n) |
int | int | Count terms until n == 1 |
| (b) | isLongSeq(int n) |
int | boolean | Compare length vs. start value |
| (c) | propLong(int n) |
int | double | Ratio of true results |
4. Complete Code
public class Hailstone {
/**
* Returns the length of a hailstone sequence starting at n.
* A hailstone sequence ends when the value reaches 1.
* If n is even, the next number is n / 2.
* If n is odd, the next number is 3n + 1.
*/
public static int hailstoneLength(int n) {
int count = 1; // Start counting from the initial number
while (n != 1) {
if (n % 2 == 0) {
n = n / 2; // Even case
} else {
n = 3 * n + 1; // Odd case
}
count++; // Count each step
}
return count; // Return total number of terms
}
/**
* Returns true if the hailstone sequence length is greater than the starting value n.
* This checks if the sequence grows significantly before shrinking.
*/
public static boolean isLongSeq(int n) {
return hailstoneLength(n) > n;
}
/**
* Returns the proportion of the first n hailstone sequences that are "long".
* A sequence is considered "long" if its length is greater than its starting value.
*/
public static double propLong(int n) {
int longCount = 0; // Count of long sequences
for (int i = 1; i <= n; i++) {
if (isLongSeq(i)) {
longCount++; // Increment if sequence i is long
}
}
return longCount / (double) n; // Proportion of long sequences
} }
</code>