Lecture 11
Learning objectives
After this class, you should be able to:
- Implement iterators.
- Write generic algorithms that use iterators.
Reading assignment
- Section 3.5, class notes.
- Lecture: Iterators.
- Pages 113-114.
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.- Write a generic
FindMin
algorithm.- 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. WWhich node is the root of the tree.
Last modified: 23 Sep 2011