Skip to main content

AP CSA FRQ Guide

2005 FRQ 4: StudentRecord

Average an inclusive range of scores, determine whether scores are nondecreasing, and choose a final average from either the full array or its later half.

Array Averages and Nondecreasing Scores22 minute targetarraysaveragesdouble arithmetictraversalhelper methods

Skills Tested

What this FRQ is really practicing

arraysaveragesdouble arithmetictraversalhelper methods

Review these topics before attempting the problem.

Starter Approach

How to begin with your own plan

  1. 1Part A: average scores from first through last, inclusive, using the correct number of entries and double arithmetic.
  2. 2Part B: return true only when every successive score is at least the previous score; equal adjacent scores count as improved.
  3. 3Part C: call hasImproved and average. When improved, average from scores.length / 2 through the last index; otherwise average the entire array.
  4. 4Use integer division for the starting index so an odd-length improved record includes the middle score.

Attempt the problem before opening the solution.

Common Mistakes

Mistakes to watch for while writing

Dividing by last - first instead of last - first + 1.
Requiring strictly increasing scores even though equal successive scores are allowed.
Skipping the middle score for an odd-length improved record or duplicating helper logic.

Self Check

Review questions before you submit

Includes the ending index in the averaging range.

There are last - first + 1 scores in the specified range.

Uses double arithmetic for the average.

Avoid truncating the result through integer division.

Checks score entries and rejects a decrease.

Compare every adjacent pair and allow equality.

Uses both supplied helper methods for the final average.

Choose the averaging range rather than duplicating the helper implementations.

Practice Links

Where to go next