SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 3 · Class Creation

Class Creation

Design and build your own classes. Learn abstraction and program design, encapsulate data with public and private, write constructors and accessor/mutator methods, pass parameters and return values, use static class members, and refer to the current object with this.

9 topics
10–18% of the exam
~20–22 class periods
College Board aligned
← Back to AP Computer Science A

Choose your study tool

Six ways to master Unit 3 — pick whichever fits how you like to study.

Flashcards
24 interactive flashcards covering encapsulation, constructors, methods, static members, scope, and this. Tap to flip.
Open flashcards →
Cheat Sheet
A one-page visual summary of Unit 3 — every part of a class, method type, and exam trap on a single screen.
Open cheat sheet →
Essentials
The core concepts plus a searchable glossary of every vocabulary term you need to know for the exam.
Open essentials →
Visual Review
A slide-by-slide walkthrough of Unit 3 with the anatomy of a class, constructors, and method structure.
Open visual review →
MCQ Practice
35 multiple-choice questions in College Board exam style — with full explanations of every answer.
Start practice →
FRQ Practice
A free-response question with model answers showing exactly how each part earns its point on the exam.
Start FRQ →

Topics in Unit 3

All 9 topics from the College Board CED, in order.

Topic 3.1
Abstraction and Program Design
Using procedural and data abstraction to design programs.
Topic 3.2
Impact of Program Design
How design choices affect users and society.
Topic 3.3
Anatomy of a Class
Encapsulation with public and private; instance variables.
Topic 3.4
Constructors
Initializing an object’s state when it is created.
Topic 3.5
Methods: How to Write
Writing accessor (getter) and mutator (setter) methods.
Topic 3.6
Methods: Passing and Returning
Parameters, return values, and how arguments are passed.
Topic 3.7
Class Variables and Methods
static variables and methods shared by the class.
Topic 3.8
Scope and Access
Local vs. instance scope and where variables are visible.
Topic 3.9
this Keyword
Referring to the current object with this.

About Unit 3

In Units 1 and 2 you used objects and control structures; in Unit 3 you design and write your own classes. It starts with abstraction and program design — identifying the data (nouns) and behaviors (verbs) a class needs — and the impact program design has on users. You’ll learn the anatomy of a class: instance variables that hold an object’s state, and encapsulation using private (hidden) and public (accessible) to protect that state.

Then you write the pieces: constructors that initialize a new object, accessor (getter) and mutator (setter) methods, and methods that pass parameters and return values. You’ll distinguish instance members from static (class) variables and methods shared by all objects, understand scope and access (local vs. instance variables), and use the this keyword to refer to the current object — often to resolve a naming conflict between a parameter and an instance variable. (Note: inheritance is outside the scope of AP CSA.)

On the exam this unit is 10–18% of the multiple-choice section and takes about 20–22 class periods. It is also the focus of the Class Design free-response question. The five computational thinking practices below run through every topic:

Practice 1
Design Code
Practice 2
Develop Code
Practice 3
Analyze Code
Practice 4
Document Code
Practice 5
Use Computers Responsibly
Up next
Unit 4: Data Collections
Start Unit 4 →