Unit 3 — Class Creation

Unit 3 is where you learn to design classes and write methods like AP expects: instance variables, constructors, method headers, return values, scope, and the this keyword. Study topics 3.1–3.9 first, then take the Unit 3 quiz: 15 MCQ + 1 FRQ.

How to use the quiz

  • Answer MCQs first. Don’t check as you go.
  • Click Check Answers to see score + explanations.
  • Try the FRQ, then reveal the sample solution.

Unit 3 Quiz — Multiple Choice (15)

Choose the best answer. (One correct option each.)

1) Which best describes abstraction in AP CSA?

Topic 3.1

2) Which design choice most improves code reuse?

Topic 3.2

3) Which line is a valid instance variable declaration inside a class?

Topic 3.3

4) Which is true about constructors?

Topic 3.4

5) What is returned by this method call?

Topic 3.5
public int addOne(int x) {
  return x + 1;
}

6) Which is true about parameters?

Topic 3.5

7) Which statement about object references is correct?

Topic 3.6

8) Which is a class (static) method call?

Topic 3.7

9) What is the scope of a local variable declared inside a method?

Topic 3.8

10) Which use of this is most common in constructors?

Topic 3.9

11) In a well-designed class, why are instance variables often private?

Topic 3.3

12) Which method signature correctly returns a String and takes an int parameter?

Topic 3.5

13) What happens when you assign one object reference variable to another?

Topic 3.6

14) Which is true about static (class) variables?

Topic 3.7

15) Which statement about access is correct?

Topic 3.8

Unit 3 Quiz — FRQ (1)

This FRQ focuses on designing a class with instance variables, a constructor, and methods (Unit 3 skills).

FRQ 1) Counter class

Write a class Counter that represents a counter that starts at an initial value. The class must include:

  • An instance variable that stores the current count.
  • A constructor public Counter(int start) that sets the initial count to start.
  • A method public void increment() that increases the count by 1.
  • A method public int getValue() that returns the current count.

Write your solution here: