PrepGo

AP Computer Science Principles Flashcards: Data Abstraction

Written by AP Content Team, Verified for 2026 AP Exams, Last updated: May 2026

Review key ideas with interactive flashcards. This set includes 31 cards to help you master important concepts.

What is a list?
A list is an ordered sequence of elements.
Card 1 of 31

All Flashcards (31)

What is a list?
A list is an ordered sequence of elements.
What notation does the exam reference sheet provide regarding list creation?
The exam reference sheet provides notation to create a list with specified values or an empty list.
What is an index?
An index is a common method for referencing the elements in a list or string using natural numbers.
How does naming a collection of data help manage complexity?
Giving a collection of data a name allows it to be referenced as a single entity, hiding the specific details of its representation.
How does treating multiple items as a single value relate to data abstraction?
This is a core principle of data abstraction, where a collection of data is given a single name, hiding the complexity of its individual parts.
What is an element?
An element is an individual value in a list that is assigned a unique index.
What does it mean for a list to be an 'ordered sequence'?
As an ordered sequence, each element in a list has a specific position that can be referenced by a unique index.
According to the exam reference sheet, what is the range of index values for a list?
The exam reference sheet describes a list structure whose index values are 1 through the length of the list, inclusive.
What is the key 'separation' that data abstraction provides?
Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.
Why is a program that uses data abstraction easier to maintain?
Using data abstraction can result in a program that is easier to maintain because it separates abstract properties from concrete representation details.
What is a major benefit of developing a data abstraction to implement in a program?
Developing a data abstraction can result in a program that is easier to develop and maintain.
What is the primary purpose of developing data abstraction using lists?
The primary purpose is to store multiple elements as a single entity, which helps manage complexity.
How does the use of data abstraction manage complexity in program code?
Data abstractions manage complexity in programs by giving a collection of data a name without referencing the specific details of the representation.
What kind of numbers are used for an index when referencing elements in a list or string?
An index uses natural numbers to reference elements.
What is the term for a common method of referencing elements in a list using natural numbers?
This method is called an index.
Explain the relationship between a list and its elements.
A list is an ordered sequence, and elements are the individual values within that sequence, each assigned a unique index.
What programming structure is commonly used to develop data abstraction for storing multiple elements?
Data abstractions can be created using lists to store multiple elements.
On the exam reference sheet, what is the index of the first element in a list?
Based on the described structure, the index value of the first element is 1.
On the exam reference sheet, what is the index of the last element in a list?
Based on the described structure, the index value of the last element is the length of the list.
What does it mean for a string to be an 'ordered sequence'?
As an ordered sequence, each character in a string has a specific position that can be referenced by an index.
What is a string?
A string is an ordered sequence of characters.
Define data abstraction.
Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.
If you need to store a student's name, grade, and ID number together, what programming concept could you use?
You could use data abstraction, likely implemented with a list, to store these multiple related items as a single value.
How are elements within a list often referenced?
Elements in a list are often referenced by their index.
What happens if a program attempts to access an out-of-bounds index, according to the exam reference sheet?
Accessing out-of-bounds indices will cause the program to terminate.
What are some alternative names for a list, depending on the programming language?
Lists are referred to by different names, such as array, depending on the programming language.
Can data abstractions contain different types of elements?
Yes, data abstractions often contain different types of elements.
How does the use of lists allow for managing related items?
The use of lists allows multiple related items to be treated as a single value.
Why is it useful that data abstractions can contain different types of elements?
This allows related but different kinds of data, like a name (string) and an age (number), to be grouped together logically.
How can a list or string be represented in a program?
A list or string can be represented using a variable.
What notation does the exam reference sheet provide regarding list assignment?
The exam reference sheet provides notation to assign a copy of one list to another.