AAP-1
To find specific solutions to generalizable problems, programmers represent and organize data in multiple ways. | AAP-1.C
Represent a list or string using a variable. [Skill 3.A] |
-
AAP-1.C.1 A list is an ordered sequence of elements. For example,
[value1, value2, value3, ...]
describes a list where value1 is the first element, value2 is the second element, value3 is the third element, and so on.
-
AAP-1.C.2 An element is an individual value in a list that is assigned a unique index.
-
AAP-1.C.3 An index is a common method for referencing the elements in a list or string using natural numbers.
-
AAP-1.C.4 A string is an ordered sequence of characters.
|
AAP-1.D
For data abstraction:
a. Develop data abstraction using lists to store multiple elements. [Skill 3.B]
b. Explain how the use of data abstraction manages complexity in program code. [Skill 3.C] |
-
AAP-1.D.1 Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.
-
AAP-1.D.2 Data abstractions manage complexity in programs by giving a collection of data a name without referencing the specific details of the representation.
-
AAP-1.D.3 Data abstractions can be created using lists.
-
AAP-1.D.4 Developing a data abstraction to implement in a program can result in a program that is easier to develop and maintain.
-
AAP-1.D.5 Data abstractions often contain different types of elements.
-
AAP-1.D.6 The use of lists allows multiple related items to be treated as a single value. Lists are referred to by different names, such as array, depending on the programming language.
- Exclusion statement (EK AAP-1.D.6): The use of linked lists is outside the scope of this course and the AP Exam.
-
AAP-1.D.7 The exam reference sheet provides the notation
[value1, value2, value3, ...]
to create a list with those values as the first, second, third, and so on items. For example,
-
Text:
aList ← [value1, value2, value3, ...]
Block:
aList ← value1, value2, value3
creates a new list that contains the values value1, value2, value3, and ... at indices 1, 2, 3, and ... respectively and assigns it to aList.
-
Text:
aList ← []
Block:
aList ← (empty)
creates a new empty list and assigns it to aList.
-
Text:
aList ← bList
Block:
aList ← bList
assigns a copy of the list bList to the list aList. For example, if bList contains [20, 40, 60], then aList will also contain [20, 40, 60] after the assignment.
-
AAP-1.D.8 The exam reference sheet describes a list structure whose index values are 1 through the number of elements in the list, inclusive. For all list operations, if a list index is less than 1 or greater than the length of the list, an error message is produced and the program will terminate.
|