Study AP Computer Science A with flashcards covering Java syntax, object-oriented programming concepts, arrays, ArrayLists, and recursion.
Must-Know AP CSA Terms and Concepts
- Encapsulation: OOP principle of bundling data (fields) and methods that operate on the data into a single class, with access controlled by modifiers (private, public, protected).
- Inheritance: OOP mechanism where a subclass extends a superclass, inheriting its fields and methods. Java: extends keyword. "Is-a" relationship. Subclasses can override methods.
- Polymorphism: The ability of different objects to respond to the same method call in different ways. Runtime polymorphism via method overriding; compile-time via method overloading.
- ArrayList vs Array: Arrays are fixed-size; ArrayLists are dynamic (resizable). ArrayList methods: add(), remove(), get(), set(), size(). Arrays: length field, direct index access.
- Recursion: A method that calls itself. Must have a base case (stops recursion) and a recursive case (moves toward base case). Stack overflow if no base case or base case never reached.
- Binary Search: O(log n) search algorithm for sorted arrays. Compare target to middle element, eliminate half the array each iteration. Requires sorted input.
- Selection Sort: O(n²) sorting algorithm. Finds the minimum element and swaps it into position. Simple but inefficient for large arrays.
AP CSA Practice Questions · AP CSA Study Guide · How to Get a 5 on AP CSA
AP and Advanced Placement are trademarks of College Board. AimFive is not affiliated with or endorsed by College Board.