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

Arrays: creating and accessing

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.

3.A. Develop code used to represent collections of related data using one-dimensional (1D) array objects.

2 What an array is

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

3 Creating arrays

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

4 Accessing elements

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

5 Arrays are objects

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.

Create an array of five integers where each element is the square of its index.

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.