Before diving into the detailed point‐by‐point criteria, here’s a high‐level summary of the FRQ 1 rubric for the 2024 AP Computer Science A exam:
simulateOneDay
, simulateManyDays
) (AP Central)The rubric is divided into two parts corresponding to the two methods students implement. For each part:
No part may receive negative credit; penalty points (such as array‐access confusion or extraneous side‐effects) are only deducted in subparts that have already earned credit, with a maximum of 3 penalty points per question. (AP Central)
simulateOneDay
(4 points)Point | Criterion |
---|---|
1 | Random value generation: At least one call to Math.random() to generate a random value. |
2 | 5% probability branch: Use a comparison of the random value against a constant to create a 5% case. |
3 | Random integer [10, 50]: Cast and scale a random value to produce an integer uniformly in [10, 50]. |
4 | Food‐consumption logic: Multiply by numBirds , compare to currentFood , and subtract correctly in both cases. |
Math.random()
at least once. (AP Central)Math.random()
disqualify. (AP Central)if (condition < 0.05) … else …
). (AP Central)<=
, reversing 5%/95%, or slight casting differences) are acceptable provided the probability is correctly split. (AP Central)(int)(Math.random()*41) + 10
. (AP Central)Math.random
disqualifies. (AP Central)totalEaten = numBirds * eachBirdEats
, compare with currentFood
, and update currentFood
correctly in all cases. (AP Central)<=
/>=
, but reversing branches or allowing negative currentFood
invalidates. (AP Central)simulateManyDays
(5 points)Point | Criterion |
---|---|
5 | Call simulateOneDay : At least one correct invocation with the numBirds parameter. |
6 | Loop guard: Loop (e.g., for or while ) runs at most numDays times and checks currentFood > 0 . |
7 | Day‐count algorithm: Correctly count the number of days simulated while food remains. |
8 | Food‐availability check: Compare currentFood to 0 within loop to determine continuation. |
9 | Return value: Return an int in all cases (either days simulated or numDays ). |
simulateOneDay
(1 point):simulateOneDay(numBirds)
within the loop. (AP Central)numDays
times and guard against currentFood == 0
. (AP Central)currentFood
to 0 inside loop to decide whether to continue simulation. (AP Central)int
(either the count or numDays
). (AP Central)A maximum of 3 penalty points may be assessed per question, only in parts that have earned credit. Common 1-point penalties:
[]
vs. get()
) (AP Central)No Penalty for minor issues with no side‐effects, such as:
private
/public
qualifier on local variables (AP Central)This rubric aligns precisely with the official 2024 College Board scoring guidelines for AP Computer Science A FRQ 1, ensuring transparent and fair grading.