Ap Csa 2021 Frq 3 Clubmembers
AP CSA 2021 FRQ 3: ClubMembers
Complete solution, scoring rubric, and walkthrough — verified from the official College Board PDF
| Question Type | ArrayList |
| Skills Tested | ArrayList add/remove, backwards traversal for safe removal, conditional filtering with two separate criteria |
| Difficulty | Medium |
| Recommended Time | 22 minutes |
What This Problem Asks
2021 AP CSA FRQ 3 ClubMembers asks students to write two ArrayList methods. addMembers takes an array of names and adds each as a new MemberInfo object with the given graduation year and true (good standing). removeMembers traverses backwards, removes all members whose graduation year <= the parameter, and returns a list of those who were also in good standing.
What This FRQ Tests
This FRQ tests Unit 4: ArrayList (add, remove, backwards traversal) and Unit 2 (conditionals, loops).
Official Question & PDF
PDF cannot display on this device. Open PDF directly →
Provided Code
public class MemberInfo
{
public MemberInfo(String name, int gradYear, boolean hasGoodStanding) { /* not shown */ }
public int getGradYear() { /* not shown */ }
public boolean inGoodStanding() { /* not shown */ }
}
public class ClubMembers
{
private ArrayList memberList;
/** Adds new members with given graduation year, all initially in good standing. */
public void addMembers(String[] names, int gradYear) { /* to be implemented in part (a) */ }
/** Returns list of graduated members in good standing; removes ALL graduated members. */
public ArrayList removeMembers(int year) { /* to be implemented in part (b) */ }
}
Part A — 4 Points
Write addMembers, which adds a new MemberInfo for each name in names to memberList, using gradYear and true (initially in good standing). Names can be added in any order.
Write Your Solution
Scoring Rubric (Part A — 4 points)
| +1 | Traverses the names array |
| +1 | Creates a MemberInfo object for each name with gradYear and true
|
| +1 | Adds each MemberInfo to memberList
|
| +1 | All new members added with correct graduation year and good standing (algorithm) |
Solution
public void addMembers(String[] names, int gradYear)
{
for (String name : names)
{
memberList.add(new MemberInfo(name, gradYear, true));
}
}
Part B — 5 Points
Write removeMembers: remove all members with gradYear <= year from memberList; return an ArrayList of those who were also inGoodStanding().
Write Your Solution
Scoring Rubric (Part B — 5 points)
| +1 | Traverses memberList (backwards or using index carefully) |
| +1 | Calls getGradYear and compares to year
|
| +1 | Calls inGoodStanding and adds qualifying members to result list |
| +1 | Removes graduated members (regardless of standing) from memberList
|
| +1 | Returns correct result list with no skipped elements (algorithm) |
Solution
public ArrayListremoveMembers(int year) { ArrayList graduated = new ArrayList (); for (int i = memberList.size() - 1; i >= 0; i--) { MemberInfo m = memberList.get(i); if (m.getGradYear() <= year) { if (m.inGoodStanding()) { graduated.add(m); } memberList.remove(i); } } return graduated; }
Common Mistakes to Avoid
Wrong
for (int i = 0; i < memberList.size(); i++) {
if (memberList.get(i).getGradYear() <= year) {
memberList.remove(i); // next element shifts to i, gets skipped!
}
}
Correct (backwards)
for (int i = memberList.size() - 1; i >= 0; i--) {
memberList.remove(i); // elements to the right of i, not yet checked
}
ALL graduated members must be removed, regardless of standing. Only the return list is filtered by good standing.
Exam Tips
Scoring Summary
| Part | Method | Points |
|---|---|---|
| Part A | Write |
4 |
| Part B | Write |
5 |
| Total | 9 |
Want the Complete 2021 FRQ Solutions?
Browse all past AP CSA FRQs with full solutions and scoring breakdowns.
Related FRQs
ArrayList 2023 FRQ 3: WeatherData — cleanData backward traversal and longest heat wave ArrayList 2022 FRQ 3: ReviewAnalysis — Array average and formatted ArrayList buildingStudy the Concepts
Struggling with FRQs? Get 1-on-1 Help
Work directly with Tanner — AP CS teacher with 11+ years experience and 1,845+ verified tutoring hours. 54.5% of students score 5s (vs. 25.5% national average).
5-session packages at $125/hr. Venmo, Zelle, PayPal, or credit card.
Frequently Asked Questions
What does 2021 AP CSA FRQ 3 ClubMembers test?
FRQ 3 tests ArrayList operations. addMembers loops through a String array and adds MemberInfo objects. removeMembers traverses backwards (to avoid skipping), conditionally adds graduated-good-standing members to a return list, and always removes graduated members.
How many points is FRQ 3 worth?
9 points: 4 for Part A (addMembers) and 5 for Part B (removeMembers).
Why traverse backwards in removeMembers?
When you remove an element from an ArrayList at index i, all subsequent elements shift left. If you traverse forward and remove, you skip the next element. Traversing backwards avoids this issue.
What's the difference between the return list and the removal condition?
ALL graduated members (gradYear <= year) are removed from memberList regardless of standing. Only graduated members who are ALSO in good standing are added to the returned list.
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.
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
Prefer email? Reach me directly at [email protected]