AP Computer Science A · Lesson 3.9 · Unit 3 · CED topic 3.8

Scope and access

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.

8.A. Explain where variables can be used in the code.

2 Local variables and blocks

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

3 Hiding: a local with the same name as an instance variable

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

4 Worked example

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

Decide what each line of this class refers to.

5 Exam focus: avoid this mistake

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

6 Sum it up

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