AP CSA FRQ Guide
2010 FRQ 2: APLine
Write a line class that stores equation coefficients, returns slope as a double, and tests whether a point lies on the line.
Class Writing and Numeric Expressions22 minute targetclassesconstructorscastingboolean expressions
Skills Tested
What this FRQ is really practicing
classesconstructorscastingboolean expressions
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
- 1Store the three coefficients from the constructor.
- 2Avoid integer division when computing slope.
- 3Evaluate the equation for a point and compare with zero.
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
Using integer division for slope.
Forgetting the negative sign in the slope formula.
Leaving c out of the point check.
Self Check
Review questions before you submit
Stores all three coefficients as instance variables.
Both methods need access to a, b, and c.
Computes slope using double arithmetic.
Cast before division or multiply by -1.0.
Checks ax + by + c == 0.
Use all three stored coefficients.
Returns a boolean from isOnLine.
The method should not print the result.
Practice Links
