AP Computer Science A · Lesson 4.3 · Unit 4 · CED topic 4.4

Array traversals

Name:   Date:  

1 Why this lesson matters

Read the opening paragraph and the "Required content" box on the lesson page. In your own words, explain each objective below.

4.A. Develop code used to traverse the elements in a 1D array and determine the result of these traversals.

2 Two loops for one job

Read this section. In your own words, summarize the main idea.

3 Assigning to the loop variable does nothing

Read this section. In your own words, summarize the main idea.

4 Arrays of objects

Read this section. In your own words, summarize the main idea.

5 Partial and reversed traversals

Read this section. In your own words, summarize the main idea.

6 Worked example

Read the "Worked example" box. Then, without looking back, try writing your own answer below.

For each task, which loop is the right tool?

7 Exam focus: avoid this mistake

Read the "Exam focus" box, then restate it in your own words.

8 Sum it up

In two or three sentences, explain this lesson's main idea to someone who has not read it.