Design Patterns Revisited - Decorator Pattern, Decorating your software
2008年07月31日 02:09 • 查看 9 次 • 打印本文
The Decorator pattern is very easy to understand, use and implement. Lets imagine we have a car factory and we offer a variety of options to our customers - sunroof, airconditioner, airbags etc. First of all we need create our Car object. To make it simple I will be demonstrating a concrete car object but the best use should be creating a Car interface and build your Car objects implementing this interface.
评论
发表评论