Now, assume one also desires the ability to add borders to windows. Again, the original Window class has no support. The ScrollingWindow subclass now poses a problem, because it has effectively created a new kind of window. If one wishes to add border support to many but not all windows, one must create subclasses WindowWithBorder and ScrollingWindowWithBorder etc. This problem gets worse with every new feature or window subtype to be added. For the decorator solution, we simply create a new BorderedWindowDecorator—at runtime, we can decorate existing windows with the ScrollingWindowDecorator or the BorderedWindowDecorator or both, as we see fit. Notice that if the functionality needs to be added to all Windows, you could modify the base class and that will do. On the other hand, sometimes (e.g., using external frameworks) it is not possible, legal, or convenient to modify the base class.
Painters prepare surfaces of building and other structures and then apply paint by means of brushes, rollers or sprayers. They work with varnish, enamels, lacquer and other materials. They may also paint interior rooms or cover walls with paper, fabrics, vinyls or other materials (paperhanger). They must be able to mix paints as well as do sandblasting and waterblasting.
By downloading this trial product, you agree to receive marketing communications from us and/or our suppliers. You may opt-out of receiving such future emails by clicking the unsubscribe link in any email you receive, or by signing into your Corel account through our website using your email address and password, and clicking on Manage Your Communication Preferences.