typewriter
February 29th, 2008, 06:17 PM
OK, assume an example of a window class, which can be passed to a decorator class for adding scrollbars and/or a decorator for adding a border.
What is the advantage of using the decorator pattern, as opposed to building those bits of functionality into the main window class, and simply turning them on or off as necessary?
What is the advantage of using the decorator pattern, as opposed to building those bits of functionality into the main window class, and simply turning them on or off as necessary?