✒️
Computer Science Principles
  • Introduction
  • Overview
  • Course at a Glance
  • Course Exam Description
  • Create Performance Task
  • Reference Sheet
  • Resources
  • Big Idea 1
    • 1.1 Collaboration
    • 1.2 Program Function and Purpose
    • 1.3 Program Design and Development
    • 1.4 Identifying and Correcting Errors
  • Big Idea 2
    • 2.1 Binary Numbers
    • 2.2 Data Compression
    • 2.3 Extracting Information from Data
    • 2.4 Using Programs with Data
  • Big Idea 3
    • 3.1 Variables and Assignments
    • 3.2 Data Abstraction
    • 3.3 Mathematical Expressions
    • 3.4 Strings
    • 3.5 Boolean Expression
    • 3.6 Conditionals
    • 3.7 Nested Conditionals
    • 3.8 Iteration
    • 3.9 Developing Algorithms
    • 3.10 Lists
    • 3.11 Binary Search
    • 3.12 Calling Procedures
    • 3.13 Developing Procedures
    • 3.14 Libraries
    • 3.15 Random Values
    • 3.16 Simulations
    • 3.17 Algorithmic Efficiency
    • 3.18 Undecidable Problems
  • Big Idea 4
    • 4.1 The Internet
    • 4.2 Fault Tolerant
    • 4.3 Parallel and Distributed Computing
  • Big Idea 5
    • 5.1 Beneficial and Harmful Effects
    • 5.2 Digital Divide
    • 5.3 Computing Bias
    • 5.4 Crowdsourcing
    • 5.5 Legal and Ethical Concerns
    • 5.6 Safe Computing
  • Code
    • Week 10
    • Week 11
    • Week 12
    • Week 13
    • Week 14
    • Week 15
    • Week 16
    • Week 17
    • Week 18
    • Week 19
    • Week 20
    • Week 21
    • Week 22
Powered by GitBook
On this page
  • Enduring Understanding
  • Learning Objective
  • Essential Knowledge
  • Learning Objective
  • Essential Knowledge

Was this helpful?

Export as PDF
  1. Big Idea 3

3.2 Data Abstraction

Enduring Understanding

To find specific solutions to generalizable problems, programmers represent and organize data in multiple ways.

Learning Objective

Represent a list or string using a variable. 

Essential Knowledge

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.

An element is an individual value in a list that is assigned a unique index.

An index is a common method for referencing the elements in a list or string using natural numbers.

A string is an ordered sequence of characters.

Learning Objective

For data abstraction:

a. Develop data abstraction using lists to store multiple elements.

b. Explain how the use of data abstraction manages complexity in program code. 

Essential Knowledge

Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.

Data abstractions manage complexity in programs by giving a collection of data a name without referencing the specific details of the representation.

Data abstractions can be created using lists.

Developing a data abstraction to implement in a program can result in a program that is easier to develop and maintain.

Data abstractions often contain different types of elements.

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: The use of linked lists is outside of the scope of this course and the AP Exam.

The exam reference sheet provides the notation

[value1, value2, value3, ...]

Text:

aList <-- [value1, value2, value3, ...]

Block:

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:

creates a new empty list and assigns it to aList.

Text:

aList <-- bList

Block:

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.

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.

Previous3.1 Variables and AssignmentsNext3.3 Mathematical Expressions

Last updated 1 year ago

Was this helpful?