Lecture 17
Learning objectives
After this class, you should be able to:
- Explain the iterator hierarchy.
- Implement iterators.
Reading assignment
- Chapters 8 and 14 of 2003 lecture notes.
- Page 215 and 216.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Write a singly-linked list class and implement an iterator for it.
- Write a program that uses the classes you wrote for the above question. This program should insert a few
int
s into your linked list object, and use an iterator to go through the entire list and output its contents.
- Questions on next lecture's material
- Draw any tree that you wish to, such as a family tree, or the tree of an organization for which you work. What is the height of your tree? Which node is the root of the tree.
Last modified: 20 Oct 2005