Skip to main content

Section 10.19 Arrays-WE7-P1

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 10.19.1

Exercises Exercises

1.
Q42: 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.
Q43: 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.
Q44: 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.