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.
Six ways to master Unit 3 — pick whichever fits how you like to study.
All 9 topics from the College Board CED, in order.
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: