Ko:
These are called Design Patterns and not OO Heuristics (Heurictic: An algorithm which usually, but not always, works or which gives nearly the right answer). Pick up a copy of Design Patterns by Gamma for more information about several OO issues and solutions. Not necessarily easy to read (being a mathematician helps) but really rewarding. I agree with Jim's point about late composition but it's not the only solution. For exapmle, instead of subclassing the container, you may want to assign behavior objects at runtime and delegate all responsibilities to them. By the way, Design Patterns provide guidelines about when to use a pattern instead of another one.
If you are also interested in heuristics (the best known example is the Traveling Salesman problem), I suggest you pick up a book on Operational Research. You may find understanding heuristics a little complex unless you have some formal backgroung in mathematics but nothing prevents you from applying them.
Hope it helps,
Daniel
If you
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only