AP CSA FRQ Guide

2021 FRQ 3: ClubMembers

Write two ClubMembers methods. The first adds new MemberInfo objects from an array of names. The second removes all graduated members from the list and returns only the removed graduates who were in good standing.

ArrayList Creation and Removal22 minute targetArrayListarraysconstructorsremovetraversal

Skills Tested

What this FRQ is really practicing

ArrayListarraysconstructorsremovetraversal

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

  1. 1Part A: traverse the names array.
  2. 2Create a new MemberInfo for each name using the given graduation year and initial good standing.
  3. 3Add each new member to memberList.
  4. 4Part B: remove every member whose graduation year is less than or equal to year.
  5. 5Return an ArrayList containing only the removed members who were in good standing.

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

Creating MemberInfo objects with false for the initial good-standing value.
Returning all graduated members instead of only graduates in good standing.
Removing only graduates in good standing and leaving other graduates in memberList.
Removing while traversing forward without adjusting the index.
Trying to remove by object or index in a way that skips shifted elements.

Self Check

Review questions before you submit

Defines addMembers with String[] and int parameters.

Part A adds all provided names for the same graduation year.

Traverses the names array.

Use an index loop or enhanced for loop over names.

Creates MemberInfo objects with name, gradYear, and true.

New members start in good standing.

Adds each new MemberInfo to memberList.

Use memberList.add(...).

Defines removeMembers with ArrayList<MemberInfo> return type and int parameter.

Part B returns a list of removed graduates in good standing.

Creates a new ArrayList<MemberInfo> for the returned members.

The returned list should contain selected removed members.

Uses getGradYear and removes members whose year is reached.

A member has graduated when getGradYear() <= year.

Uses inGoodStanding before adding to the returned list.

Only graduated members in good standing are returned.

Practice Links

Where to go next