Polymorphism

1



slide: Section 2.1: Polymorphism


hush">

Idioms in hush

2



slide: Section 2.2: Idioms in


A catalogue of design patterns

3



slide: Section 2.3: A catalogue of design patterns


Event-driven computation

4



slide: Section 2.4: Event-driven computation

  1. How would you explain the letter/envelope idiom?
  2. Characterize the notion of polymorphism. Give some examples.
  3. What is a canonical class? Characterize its ingredients and give an example.
  4. Give a brief description of the handle/body idiom, virtual self-reference, and dynamic role switching.
  5. What kinds of patterns can you distinguish? Why do you consider patterns to be of relevance?
  6. Give a detailed description of the Factory pattern and also of the Observer pattern.
  7. Describe the Reactor pattern. Why is it useful?
  8. Give an example of a system based on event-driven computation.

Further reading

For an introduction to Java, there is ample choice. An excellent online tutorial can be found on java.sun.com/docs/books/tutorial . As textbooks on C++ I recommend  [Lippman91], and for the more advanced reader  [Stroustrup98]. For an extensive introduction to STL, read  [STL].  [Coplien92] is the original introduction to idioms in C++. The by now classical book for patterns is  [GOF94]. Well worth reading are the many articles in the POPL proceedings,  [POPL1],  [POPL2] and  [POPL3].