Map / ArrayList & Data
📋 ArrayList & Data
An ArrayList grows and shrinks as you add and remove. It holds objects, so int values are boxed into Integer. Read data from a text file with File and Scanner, then put it in order with selection and insertion sort.
- ArrayList<E>
- add
- get
- set
- remove
- size
- Integer
- File
- Scanner
- throws IOException
- sorting
🛠 You will build: A class roster read from a file
0 / 12 done
- 🔮 Predict 1. A list that grows and shrinks
- 🔮 Predict 2. Remove by position or by value?
- 👣 Trace 3. Two names, one list
- 🐞 Debug 4. Skipped while removing
- 👣 Trace 5. Reading a file line by line
- 🐞 Debug 6. Say that it can fail
- ✏️ Fill in 7. Add up a file of numbers
- 🧩 Order 8. Names into a list
- 🔮 Predict 9. The empty line after a number
- ✏️ Fill in 10. Selection sort
- 🔮 Predict 11. Insertion sort, pass by pass
- ⌨️ Write 12. Who passed?
Unit check
Earlier activities again, with new inputs and edge cases. They also come back on the map as review the next day.