AP CSA FRQ Guide
2026 FRQ 3: Attendance
Write the Attendance method moreHistoryThanMathAbsences, which compares two ArrayLists of CourseRecord objects (historyList and mathList) and counts students enrolled in both courses who have more absences in the history course than the math course.
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 with your own plan
- 1Loop through historyList and, for each CourseRecord, search mathList for a CourseRecord with the same student ID.
- 2When a match is found, compare absence counts and increment a counter if the history absences are greater than the math absences.
- 3Return the final count without modifying historyList or mathList.
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
Iterates through historyList.
Use a loop with historyList.get(i) or an enhanced for loop.
Searches mathList for a matching student ID.
Nest a loop over mathList (or use an equivalent lookup) inside the historyList loop.
Compares student IDs using getStudentID and equals.
Use .equals(...) to compare the String IDs, not ==.
Compares getAbsences() between the matched records.
The history record's absences must be strictly greater than the math record's.
Increments a counter when the condition is met.
Track how many qualifying students have been found.
Returns the final count.
Return the counter after both loops finish.
Practice Links
