Abstraction Concepts Flashcards
7 cards from real APCSP practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Abstraction Concepts flashcards as text
In the AP CSP 'Explore' performance task context, which of the following computing innovations relies most heavily on abstraction?
Answer: An operating system that manages hardware resources through system calls
An operating system abstracts hardware complexity behind system calls, so applications don't interact with hardware directly.
Which of the following is the BEST reason to create a new abstraction in a program?
Answer: To group related functionality so it can be reused and understood without implementation details
Creating an abstraction groups related functionality, promotes reuse, and hides complexity for maintainability.
A file system abstraction lets users work with 'files' and 'folders.' What complexity does this hide?
Answer: The low-level details of how data is stored on magnetic or solid-state media
File system abstractions hide sector-level disk storage details, presenting a human-friendly folder/file metaphor.
Which of the following pairs shows abstraction at TWO different levels?
Answer: JavaScript code and the web browser's JavaScript engine
JavaScript code is a higher-level abstraction; the browser's JS engine is the lower-level implementation that executes it.
A student writes `average = computeAverage(scores)`. Why is `computeAverage` considered an abstraction?
Answer: Because the student can use it without knowing how the averaging calculation is implemented
The function is an abstraction because it hides the summation and division logic behind a single named call.
How does abstraction relate to the concept of 'modularity' in programming?
Answer: Abstraction enables modularity by allowing separate modules to interact through defined interfaces without exposing internals
Abstraction enables modularity because each module can hide its implementation and expose only a clean interface.
What is the relationship between an API and abstraction?
Answer: An API is an abstraction layer that exposes specific functionality while hiding implementation details
An API (Application Programming Interface) is a form of abstraction — it provides a defined interface while hiding internal code.