ARR - Enhanced for Loop for Arrays (Lesson)
Enhanced for Loop for Arrays
Introduction
Array Loop Challenge
- Create an array of ints that will hold each integer in your phone number.
- Loop through the array and calculate the average of the ints.
- Return the average
Then….
- Try to rewrite your loop without using the array index.
Enhanced for Loop
Click below to learn more about Enhanced for loops.
Click on "Runestone Academy" below to open the required reading that is listed.
- Read: Runestone Academy: AP CSA – Java Review
Links to an external site.:
- 8.2 – Looping with the For-Each Loop
- 8.13 – Free-Response Questions
Click on "Runestone Academy" below to open the required reading that is listed.
- Read: Introduction to Computer Science Using Java
Links to an external site.:
- Chapter 61: Useful Array Algorithms
- Chapter 62: Objects that Contain Arrays
- Chapter 63: Arrays as Parameters
- Chapter 64: Methods that Change Arrays
- Complete the quizzes and review for practice.
Access your text for this course and read what is listed below.
- Read 5 Steps to a 5:
- Concept 3
- Concept 4
Array Practice
Practice-It! Practice
1. Go to the PracticeIt website Links to an external site..
2. Log into account.
3. Click on Start Practicing!
4. Go to the most recent edition.
5. Click on Chapter 7: Arrays
6. Complete Exercise: 7.10
CodingBat Practice
1. Go to the CodingBat website Links to an external site..
2. Log into your account.
3. Make sure that you are on the Java tab (not Python).
4. Select Array – 3.
5. Complete the Array-3 exercises for free response practice.
Array Quiz Review
- Go to AP Classroom Links to an external site..
- Complete Unit 6 Progress Check(s).
Free Response Question Example
View part b to the Sound 2011 Free Response Question. This activity is required to complete your Discussion for this module.
Write your own solution to this method. You will need your answer to complete the discussion assignment for this lesson.
IMAGES CREATED BY GAVS