Java Arena

Module 24

Lists inside objects

Objects that keep a list of their own. A list as an instance variable, created in the constructor; methods that add to the list, go through it, print it, empty it and remove from it; totals and searches over the objects on the list; and rules the object checks before it adds anything. The start of MOOC part 6.

Steps

  1. Lists, a quick review
  2. A list as an instance variable
  3. Methods that go through the list
  4. Objects on the object's list
  5. Printing an object that holds a list
  6. Clearing and removing
  7. Totals from the objects on the list
  8. Finding an object on the list
  9. Rules the owner enforces