CPSC 170 Postlab 8: Introduction to Collections
For our discussion of collections we will use Lewis and Chase,
the second text for this course.
Your assignment is as follows:
- Read sections 2.12-2.17. Most of these sections cover material that
we have touched on but that will take on new importance for collections.
Pay particular attention to 2.12 (Interfaces, particularly the Iterator interface), 2.15 (Polymorphism,
noting the difference between polymorphism via inheritance and
polymorphism via interfaces), and 2.16 (Generics, a new topic that we
will be very important for our discussion of collections).
- Read sections 3.1-3.5. This extends what we did in class today,
providing an introduction to collections
using the SetADT interface and ArraySet implementation. You will
find that there is a lot of material in 3.5. You don't have to study it
all in detail, but try hard to understand the role of iterators and
generics in the ArraySet class.
- Do exercises 3.1, 3.3, 3.5, and 3.6.
- Write an interesting questions about something in the reading
that you did not understand or would like to know more about.