AP Computer Science Principles Flashcards: Libraries
Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026
Review key ideas with interactive flashcards. This set includes 14 cards to help you master important concepts.
If you are unsure how to use a procedure from a library you've imported, what should you consult?
You should consult the documentation for the library's API to understand the procedure's behavior and usage.
Card 1 of 14
All Flashcards (14)
If you are unsure how to use a procedure from a library you've imported, what should you consult?
You should consult the documentation for the library's API to understand the procedure's behavior and usage.
What information does an API's specification provide about library procedures?
The API specifies how the procedures behave and the correct way they can be used by other programs.
What is a software library?
A software library contains procedures that may be used in creating new programs.
A programmer copies a function they wrote for a past project into their current one. What kind of code source is this?
This is an example of using an existing code segment from an internal source.
What is the key consideration when choosing to use existing code in a new program?
The key consideration is to select appropriate libraries or code segments that meet the specific needs of the new program.
What are Application Program Interfaces (APIs)?
APIs are specifications for how the procedures in a library behave and can be used.
What term describes the set of specifications for how procedures in a library can be used?
This set of specifications is called the Application Program Interface (API).
How does an API relate to a software library?
An API acts as the rulebook or interface, defining how a programmer can access and use the procedures contained within a software library.
How does using pre-written procedures from a library help a programmer?
It simplifies the task of creating complex programs, as the programmer does not have to write and test that code from scratch.
What is the primary benefit of using software libraries in programming?
The use of libraries simplifies the task of creating complex programs by providing pre-written code.
What are the reusable components contained within a software library?
A software library contains procedures, which are segments of code that can be used in creating new programs.
Why is documentation for an API or library essential?
Documentation is necessary to understand the behaviors provided by the API/library and to learn how to use its procedures correctly.
From where can existing code segments be sourced for a new program?
Existing code segments can come from internal sources, like previously written code, or external sources, such as software libraries.
A developer needs to add graphing functionality to their new program. What is an efficient first step?
An efficient first step is to select an appropriate existing library that provides procedures for creating graphs.