MFC Programmer's SourceBook : Thinking in C++
Bruce Eckel's Thinking in C++, 2nd Ed Contents | Prev | Next

Exercises

  1. Using SingletonPattern.cpp as a starting point, create a class that manages a fixed number of its own objects.
  2. Create a minimal Observer-Observable design in two classes, without base classes and without the extra arguments in Observer.h and the member functions in Observable.h. Just create the bare minimum in the two classes, then demonstrate your design by creating one Observable and many Observers, and cause the Observable to update the Observers.
  3. Change InnerClassIdiom.cpp so that Outer uses multiple inheritance instead of the inner class idiom.
  4. Add a class Plastic to TrashVisitor.cpp.
  5. Add a class Plastic to DynaTrash.cpp.
Contents | Prev | Next


Go to CodeGuru.com
Contact: webmaster@codeguru.com
© Copyright 1997-1999 CodeGuru