AP CSA 2.5 FRQ Practice: Eligibility

Unit 2: Selection and Iteration · Lesson 2.5 · FRQ Practice

Eligibility

A free response question in the shape the exam uses: a stated contract, four rubric parts, and no main method handed to you. Worth 4 points.

Why this question is worth four points

The exam tests && and || by making one of them wrong in a way that is right most of the time. Swapping && for || in a two condition rule gives the same answer on three of the four combinations. Every part here has a case for the combination that separates them.

What you are given

Nothing is given. Write a class named Eligible containing exactly the four static methods described below. Do not write a main method.

The question

  1. (a) public static boolean canDrive(int age, boolean hasLicense) returns whether the person is at least 16 AND has a license.
  2. (b) public static boolean freeEntry(int age, boolean member) returns whether the person is under 6 OR is a member.
  3. (c) public static boolean needsReview(int score, int absences) returns whether the score is under 70 OR absences are over 10.
  4. (d) public static boolean honorRoll(int score, int absences) returns whether the score is at least 90 AND absences are at most 3.

What the reader is looking for

  1. Write class Eligible with the four static methods exactly as described. No main method.
  2. None of these needs an if. Return the compound expression itself.
  3. Read each boundary carefully: "at least 16" is >= 16, "under 6" is < 6, "over 10" is > 10, "at most 3" is <= 3.

Worked examples

These show what a correct answer prints. There are more cases you cannot see, and they use different values, so an answer built around just these numbers will fail.

Example 1 input
17 true 95 2
Example 1 output
true
true
false
true
Example 2 input
17 false 95 2
Example 2 output
false
false
false
true

Your answer

Main.java

Input for the Run button

How this is scored: your answer runs against every test case, and the fraction it passes becomes your score out of 4. That is not how a human AP reader marks a rubric, so treat the score as a check on whether your code works, and the rubric above as the thing you are actually practising.


  

  

Stuck?

Hint 1

&& needs both sides true. || needs only one. Read the sentence again: "and" versus "or" is the whole question.

Hint 2

A rule with two conditions has four combinations. Test all four in your head before you submit: true/true, true/false, false/true, false/false.

Hint 3

"At most 3" includes 3 itself, so it is <= 3. Writing < 3 silently excludes the student with exactly three absences.

Before you submit

4 mistake(s) that lose points on this question

Each of these is a real error the grader catches. Check your answer against them before you submit, not instead of trying.

  • part (a) uses || instead of &&
  • part (b) uses && instead of ||
  • part (c) uses && instead of ||
  • part (d) excludes exactly three absences

Where to go next

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]