The visual guide to
AP® Computer Science A
4 units, 100 topics. Each topic is explained in writing, drawn as a lesson you can watch, and checked with practice questions.
/
Each unit is as wide as its share of the exam's multiple-choice section.Filled: topics you've opened.
Unit 1Using Objects and Methods
- Algorithms and the Path a Program Takes
- Compilers, Bytecode, and Three Kinds of Error
- Variables as Named Boxes in Memory
- int, double, and boolean
- Arithmetic Expressions and Operator Precedence
- Integer Division and the Mod Operator
- String Concatenation and Console Output
- Assignment Statements and Swapping Two Values
- Reading Input with a Scanner
- Casting Between int and double
- The Range of an int and Overflow
- Compound Assignment and Increment Operators
- APIs, Libraries, and import
- Comments, Preconditions, and Postconditions
- Reading a Method Signature
- Calling Class Methods
- The Math Class
- Random Numbers in a Range
- Classes as Blueprints, Objects as Instances
- Reference Variables, null, and NullPointerException
- Class Hierarchies, Subclasses, and the Object Class
- Object Creation with new, and Aliasing
- Calling Instance Methods
- Strings, Immutability, substring, and indexOf
- equals, ==, and compareTo for Strings
Unit 2Selection and Iteration
- Algorithms That Branch and Repeat
- Boolean Expressions and Relational Operators
- Boolean Variables and Flags
- The if Statement and Its Block
- if-else and else-if Chains
- Nested if Statements
- Combining Conditions with AND, OR, and NOT
- Short-Circuit Evaluation
- De Morgan's Laws and Negating a Condition
- Truth Tables and Equivalent Conditions
- The while Loop and Its Three Moving Parts
- Infinite Loops and the Missing Update
- Sentinel Loops and Reading Until a Signal
- The for Loop: Initialize, Test, Update
- Off-by-One Errors and Loop Boundaries
- Trace Tables: Watching a Loop Fill In
- Accumulators, Counters, and Running Totals
- Finding a Maximum or Minimum in a Loop
- Digit Algorithms with Division and Mod
- Traversing a String Character by Character
- Building and Reversing Strings in a Loop
- Nested Loops and How Often the Inside Runs
- Drawing Patterns with Nested Loops
- Counting Statement Executions
Unit 3Class Creation
- Abstraction: Hiding Detail Behind an Interface
- Designing a Class from a Problem Description
- How Program Design Choices Affect People
- The Anatomy of a Class
- private Fields and Encapsulation
- Constructors and Default Values
- Overloaded Constructors
- void Methods versus Methods That Return
- Parameters, Arguments, and Pass by Value
- Accessors, Mutators, and the return Path
- Passing an Object Reference into a Method
- Returning a Reference and Leaking Private State
- static Variables Shared by Every Object
- Class Methods and the final Keyword
- Scope, Shadowing, and Where a Variable Lives
- The this Keyword
Unit 4Data Collections
- Data Collection, Privacy, and Bias
- Turning a Data Set into an Algorithm
- Creating an Array and Indexing from Zero
- Default Values and ArrayIndexOutOfBoundsException
- Traversing an Array with a for Loop
- The Enhanced for Loop and What It Cannot Do
- Summing and Averaging an Array
- Finding the Maximum and Its Index
- Shifting, Rotating, and Reversing an Array
- Counting, Any, and All over an Array
- Opening a File with File and Scanner
- Reading a File Line by Line into a Collection
- Integer, Double, Autoboxing and Unboxing
- ArrayList add, get, set, and size
- Insert and Remove: The Shift Nobody Sees
- Traversing an ArrayList
- Removing While Traversing
- Standard ArrayList Algorithms
- Traversing Two Collections at Once
- A 2D Array Is an Array of Arrays
- Initializer Lists and Row-Column Indexing
- Row-Major Traversal with Nested Loops
- Column-Major Traversal and Diagonals
- Summing Rows and Columns of a Grid
- Finding a Value and Its Neighbors in a Grid
- Linear Search
- Selection Sort, Pass by Pass
- Insertion Sort, Pass by Pass
- Selection Sort versus Insertion Sort
- What Makes a Method Recursive
- The Call Stack Growing and Unwinding
- Base Cases and StackOverflowError
- Binary Search: Halving the Range
- Merge Sort: Split, Sort, Merge
- Recursive Traversal of Strings and Arrays