AP CSA FRQ Guide
2021 FRQ 2: CombinedTable
Write a complete CombinedTable class that stores two SingleTable objects. The class determines whether the combined tables can seat a party and computes desirability from the component tables, including a height mismatch penalty.
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 without copying a solution
- 1Write the complete class header, instance variables, and constructor.
- 2Store references to the two SingleTable objects so later table changes are reflected.
- 3Implement canSeat using the total seats of both tables minus two.
- 4Implement getDesirability as the average view quality, subtracting ten when the two table heights differ.
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
Defines the CombinedTable class.
Question 2 asks for the complete class.
Stores two SingleTable references.
Use fields for the component tables, not copied values.
Includes a constructor with two SingleTable parameters.
The constructor receives the two tables to combine.
Stores the SingleTable parameters in instance variables.
Do not store only the current seats, height, or view quality.
Defines canSeat with boolean return type and an int parameter.
This method answers whether a party can fit.
Uses getNumSeats from both tables.
Capacity comes from the two SingleTable objects.
Subtracts two seats from the combined capacity.
Two seats are lost when the tables are pushed together.
Compares adjusted capacity with the requested party size.
Use >= or <= so exact capacity is allowed.
Practice Links
