AP CSA 1.3 FRQ Practice: Scoreboard Line

Unit 1: Using Objects and Methods · Lesson 1.3 · FRQ Practice

Scoreboard Line

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

Half the free response points lost on output questions are lost to the difference between print and println, and to concatenation that silently turns arithmetic into text. "Score: " + 2 + 3 is "Score: 23". This question is built around that.

What you are given

Four variables are declared for you: String team, int made, int missed and int bonus.

The question

  1. (a) Print the team name followed by a colon, a space, and the number of shots made, on one line.
  2. (b) Print the total number of shots attempted.
  3. (c) Print the score, counting two points per shot made plus the bonus.
  4. (d) Print the team name and the score joined by a space, on one line.

What the reader is looking for

  1. Write a code segment that prints four lines in rubric order.
  2. In part (a) and part (d) the number must be the computed value, not the digits stuck together. Parentheses decide that.
  3. Nothing here needs an if or a loop.

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 is given
String team = "Hawks";
int made = 12;
int missed = 7;
int bonus = 3;
Example 1 output
Hawks: 12
19
27
Hawks 27
Example 2 is given
String team = "Jets";
int made = 0;
int missed = 5;
int bonus = 0;
Example 2 output
Jets: 0
5
0
Jets 0

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

Once a String appears on the left of a +, every + after it concatenates. "x" + 2 + 3 is "x23". Wrap the arithmetic in parentheses, or compute it into a variable first, which is what the reference does.

Hint 2

Part (b) has no String in it at all, so made + missed is ordinary addition and prints as one number.

Hint 3

println moves to a new line and print does not. Four printed lines means four println calls, not four print calls.

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]