AP Computer Science A Flashcards: Abstraction and Program Design
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Review key ideas with interactive flashcards. This set includes 10 cards to help you master important concepts.
What two things must be preserved when changing a method's internals to maintain procedural abstraction?
The method signature (name, parameters, return type) and what the method does (its contract or purpose) must be preserved.
Card 1 of 10
All Flashcards (10)
What two things must be preserved when changing a method's internals to maintain procedural abstraction?
The method signature (name, parameters, return type) and what the method does (its contract or purpose) must be preserved.
What is a key benefit of procedural abstraction for program maintenance?
It allows a programmer to change the internal implementation of a method without requiring changes to any other parts of the code that call that method.
What is procedural abstraction?
Procedural abstraction involves using methods or procedures where the user knows what the method does, but not the specific details of how it is implemented.
What are two ways to represent the design of a program?
A program's design can be represented using natural language or by creating diagrams that illustrate the classes in the program.
A programmer updates a method to use a more efficient algorithm but keeps the method name and parameters the same. What principle is being applied?
This is an application of procedural abstraction, as the method's internal logic is changed while its signature and overall purpose are preserved.
What is abstraction?
Abstraction is the process of reducing complexity by focusing on the main idea while hiding irrelevant details.
Define data abstraction.
Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.
When you use a pre-built `ArrayList` class without knowing how it dynamically resizes its internal array, what are you taking advantage of?
You are taking advantage of both data abstraction (the list itself) and procedural abstraction (the methods like `.add()` and `.get()`).
In a program design, what elements define the data and procedural abstractions within a class?
The class's attributes represent its data abstractions, and its behaviors (methods) represent its procedural abstractions.
How does data abstraction manage complexity?
It manages complexity by giving data a name and allowing it to be used without needing to know the specific details of its underlying representation.