- APCalendar Free Response Solution
- StepTracker Free Response Solution
- Delimiters Free Response Solution
- LightBoard Free Response Solution
Though largely straightforward, the 2019 AP CS A Free Response questions feature minor challenges.
The APCalendar
method dayOfWeek
can be solved using a simple mathematical calculation (without a loop); however, this might not be immediately obvious.
The StepTracker
class can be made more complex than necessary by storing an ArrayList
as an instance variable. A row in the example call table shows that the averageSteps
method should return 0.0
if no days have yet been recorded. This is easily missed.
The Delimiters
method isBalanced
must check if the number of closing delimiters exceeds the number of opening delimiters at any point, not just at the end.
The LightBoard
method evaluateLight
must traverse the specified column correctly. It must also check the exact conditions specified.