Map / Arrays
🧮 Arrays
An array holds a fixed number of values of one type, numbered from 0. Walk it with for or for-each, find the biggest, search it, and lay out a grid with a 2D array. An array variable is a reference, so two names can share one array.
- int[]
- new int[n]
- {1, 2, 3}
- .length
- a[i]
- for-each
- int[][]
🛠 You will build: A gradebook and a game board
0 / 11 done
- 🔮 Predict 1. Slots numbered from 0
- 👣 Trace 2. An array goes into a method
- 🔮 Predict 3. for-each hands you a copy
- 🧩 Order 4. The hottest day
- ✏️ Fill in 5. Class average
- 🐞 Debug 6. Steps past the end
- 🐞 Debug 7. A copy that is not a copy
- 🔮 Predict 8. Rows and columns
- 🔧 Modify 9. Search from the end
- ⌨️ Write 10. A gradebook
- ⌨️ Write 11. A game board
Unit check
Earlier activities again, with new inputs and edge cases. They also come back on the map as review the next day.