Tuesday, July 15, 2008

Design Pattern Riddle #2

q. If you find yourself needing more functionality,
And your needs are dynamic and versatile,
Then I’m a good alternative to subclassing.
You will find that using me quite worthwhile.

a. Decorator

~/riddle by me

2 comments:

  1. Anonymous11:06 AM

    Composition

    ReplyDelete
  2. Anonymous1:14 PM

    I would have guessed strategy.

    ReplyDelete