Skip to main content

Section 9.19 Arrays-WE7-P1

Subsection 9.19.1 Subgoals for Evaluating Arrays

  1. Set up array from 0 to size-1

  2. Evaluate data type of statements against array

  3. Trace statements, updating slots as you go

    1. Remember assignment subgoals

Subsection 9.19.2 Arrays-WE7-P1

Exercises Exercises

1.

Put the following code in order to create a method that will find the last occurrence of a target value and return the index of where that value is located.

2.

Put the following code in order to create a method that will find the first occurrence of a target value and return the index of where that value is located.

3.

Put the following code in order to create a method that will count the number of occurrences of a target value and return the count.

You have attempted of activities on this page.