Classes & objects
- Use existing classes in other classes.
- Trace and analyze code with objects & references.
- Design and implement complete classes.
Classes & objects practice
- Constructing objects
- Class writing order
- Class writing exercise
- Duplicate data as instance variables
- Primitive types vs references exercises
- Primitive types vs references exercises with calls
- this keyword
- Static vs instance methods and fields
- ZombiePlant free response
- Object oriented UI
Data types and decisions
- Floating point roundoff error
- Generate random numbers with Math.random()
- Strings on the AP CS A Exam
- compareTo on the AP CS A Exam
- Short circuit evaluation of boolean expressions
- Logical operator precedence
- Boolean expression simplification
- else statement pairing
Standard algorithms
- Use standard algorithms when appropriate.
- Recognize situations in which standard algorithms are appropriate.
Standard algorithm explanations and practice
- Finding the minimum or maximum
- Detecting duplicates
- Accessing consecutive pairs
- Reversing an array
- Reversing an ArrayList
- Shifting or rotating elements
- Consolidating or filtering an array
- Inserting into a sorted list
- Also see Sorting & searching below
Loops, arrays and ArrayList
objects
- Use
for
,while
, and enhancedfor
loops appropriately. - Apply standard algorithms to arrays and
ArrayList
objects. - Manipulate
ArrayList
objects, including adding and removing.
Loops, arrays and ArrayList
practice
- Traversing arrays and lists
- Run length increasing exercise
- Arrays as objects exercises
- Arrays of objects exercises
- Enhanced for loops
- Enhanced for loop exercises (including with 2D arrays)
- ArrayList practice
- Specimen free response
- Aquarium free response
- CandidatePool free response
- MyArrayList exercise
2D arrays
- Traverse 2D arrays in various orders.
- Fill a two dimensional array form a 1D data structure.
- Visit specific elements in a 2 dimensional array.
2D array practice
- Intro to 2D arrays
- Treating a 2D array as an array of 1D arrays
- 2D array exercises
- Mazer free response
- Droppy free response
- Flight free response
- MatrixManipulator exercise
Inheritance & polymorphism
- Design and implement subclasses.
- Override superclass methods.
- Work with abstract classes and methods (no longer tested).
Inheritance & polymorphism practice
- Inheritance and polymorphism
- Changing reference types
- WeightedDie free response
- TrickCard free response
- PirateParrot free response
Recursion
- Write recursive methods.
- Implement recursive methods.
- Analyze recursive methods.
- Trace recursive methods.
Recursion resources
- Writing recursive methods
- Tracing recursive methods
- Analyzing recursive methods
- Recursive methods with print statements
- Recursive helper methods
- Recursive base conversion exercise
- DeterminantFinder exercise
Sorting & searching
- Code sequential/linear search, binary search, selection sort, insertion sort, and merge sort.
- Identify and analyze variants (ex: back to front).
- Determine if an implementation is correct.
Sorting & searching resources
Labs
Misc
GridWorld Case Study
Note: GridWorld has not been featured on the 2015 and subsequent AP CS Exams. These materials remain here for those classes that still use the old case study.
- Practice with the
Location
class and theGrid
interface. - Write a complete subclass of
Critter
. - Use
Grid
to implement a game.