AP Computer Science A Flashcards: Application Program Interface (API) and Libraries
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.
As a programmer, where would you look to understand the specific data and actions available for a class found in a library?
You would look in the documentation found in the API specifications and libraries to identify the attributes and behaviors of the class.
Card 1 of 10
All Flashcards (10)
As a programmer, where would you look to understand the specific data and actions available for a class found in a library?
You would look in the documentation found in the API specifications and libraries to identify the attributes and behaviors of the class.
In the context of programming, what is a library?
Libraries are collections of classes.
If an API's documentation for a 'Car' class lists 'color' and 'maxSpeed', are these attributes or behaviors?
These are attributes, as they represent data related to the class that would be stored in variables.
What is the purpose of an Application Programming Interface (API) specification?
An API specification informs the programmer how to use the classes contained in a library.
How do attributes and behaviors differ within a class?
Attributes are the data of a class (stored in variables), while behaviors are the actions the class can perform (defined by methods).
What are the "attributes" of a class?
Attributes refer to the data related to the class and are stored in variables.
If an API's documentation for a 'Car' class lists 'startEngine()' and 'accelerate()', are these attributes or behaviors?
These are behaviors, as they represent what instances of the class can do and are defined by methods.
Why is documentation within an API specification essential for a programmer?
API documentation is essential for understanding the attributes and behaviors of a class, which is necessary to use it correctly.
Describe the relationship between an API and a library.
A library is a collection of classes, and the API is the specification that explains how a programmer can use those classes.
What are the "behaviors" of a class?
Behaviors refer to what instances of the class can do and are defined by methods.