AP Computer Science A lessons

Theory is written in clear English: definitions and theorems are worded exactly as the exam words them, with a plain-English explanation alongside — so no term on exam day is new.

All AP Computer Science A lessons (16)

Unit 1 — Using Objects and Methods

This chapter teaches how to use code that other people have written: building objects with new, calling methods, capturing return values, and working with the three most important built-in classes, String, Math, and the two wrapper classes Integer and Double. All of Unit 3 (writing your own classes) and Unit 4 (arrays, ArrayList) stand on two ideas from this chapter: a variable of a class type holds a reference rather than the object itself, and an argument passed to a method is always a copy.

Unit 2 — Selection and Iteration

This chapter teaches the two things that make up every program: deciding which code to run, and how many times to run it. Boolean expressions and De Morgan's laws are the language for writing conditions; the if/else if ladder and the while and for loops are how they are carried out. Every later Unit builds on this chapter — Unit 3 packages that logic into class methods, and Unit 4 iterates over collections of data.

Unit 3 — Class Creation

Units 1 and 2 taught you to use classes that other people wrote; this chapter makes you write them yourself. This is the heaviest chapter of the course — two of the four free-response questions on the real exam fall here, and Unit 4 will fill arrays and ArrayLists with the very objects you design here.

Unit 4 — Data Collections

The heaviest chapter of the course, making up 30–40% of the exam and almost all of the free-response section. It brings together the required data structures — one-dimensional arrays, ArrayList, two-dimensional arrays — along with the standard algorithms for searching, sorting, and recursion. Everything learned in Unit 1 through Unit 3 (objects, loops, custom classes) is called back here, but this time running on a collection of elements instead of a single value.