4.5.  Review Questions

[ fromfile: lists-questions.xml id: lists-questions ]

  1. What is the Iterator pattern? Give three examples.

  2. Draw a UML diagram with three or more classes and make sure that all of these different kinds of relationships are represented.

    • aggregation and composition

    • to-One and to-Many

    • unidirectional and bidirectional

    The classes should represent real-world concepts, and the relationships should attempt to represent reality. Write a couple of paragraphs explaining why there is a relationship of each kind in your diagram.