Skip to main content

AP CSA FRQ Guide

2007 FRQ 3: StudentAnswerSheet

Score a multiple-choice answer sheet with credit for correct answers, penalties for incorrect answers, and no change for omissions, then return the name of a highest-scoring student.

ArrayList Scoring and Maximum Search22 minute targetArrayListString equalitydouble arithmeticobjectsmaximum search

Skills Tested

What this FRQ is really practicing

ArrayListString equalitydouble arithmeticobjectsmaximum search

Review these topics before attempting the problem.

Starter Approach

How to begin with your own plan

  1. 1Part A: compare answers with the corresponding key entries using String content equality.
  2. 2Award 1 point per correct answer, deduct 0.25 per incorrect answer, and leave the score unchanged for an omitted answer represented by a question mark.
  3. 3Part B: use getScore to find the highest-scoring answer sheet and return its student name; any tied highest scorer is acceptable.
  4. 4Handle negative scores correctly when initializing the maximum.

Attempt the problem before opening the solution.

Common Mistakes

Mistakes to watch for while writing

Deducting points for omitted answers or comparing strings with ==.
Using integer arithmetic for the quarter-point penalty.
Initializing the highest score to zero even though every student may have a negative score.

Self Check

Review questions before you submit

Compares answer strings by their contents.

Use equals rather than reference equality.

Recognizes omitted answers.

The question-mark answer must not incur a penalty.

Represents the quarter-point penalty without integer division.

Accumulate scores using double arithmetic.

Uses score and name accessors to select the highest scorer.

Return a student name, not the numerical score.

Practice Links

Where to go next