Aa

Text size

?

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

  1. 🔮 Predict 1. A list that grows and shrinks
  2. 🔮 Predict 2. Remove by position or by value?
  3. 👣 Trace 3. Two names, one list
  4. 🐞 Debug 4. Skipped while removing
  5. 👣 Trace 5. Reading a file line by line
  6. 🐞 Debug 6. Say that it can fail
  7. ✏️ Fill in 7. Add up a file of numbers
  8. 🧩 Order 8. Names into a list
  9. 🔮 Predict 9. The empty line after a number
  10. ✏️ Fill in 10. Selection sort
  11. 🔮 Predict 11. Insertion sort, pass by pass
  12. ⌨️ 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.

  1. 🔮 Predict Check 1. Check: zeros in the list
  2. ⌨️ Write Check 2. Check: average of a file