Section 8.1

Lists & Traversal

Learning Goals

AAP-1.D: 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. 

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. 

DAT-1.A.5: Abstraction is the process of reducing complexity by focusing on the main idea. By hiding details irrelevant to the question at hand and bringing together related and useful details, abstraction reduces complexity and allows one to focus on the idea. 


Objectives and Description

The objective of this lesson is to introduce students to lists/arrays and begin teaching some of the operations associated with them. Students will learn about properly accessing elements in lists, how to combine lists, and how to traverse (iterate over) them.

Activities

Activity 8.1.1 (15 minutes)


Activity 8.1.2 (45 minutes)

5.  Class Discussion.  Have students explain how a list works, what data abstraction is, and how data abstraction manages the complexity        of code in a program.

Previous