May 2019
Beginner to intermediate
548 pages
12h 39m
English
The Decorator design pattern allows the dynamic assignment of new behaviors to a given object. Decorators give flexibility similar to that offered by inheritance, but they provide much-extended functionality. When used, inheritance objects can be changed only before running a program. However, the decorator can change an object during runtime, because the decorator can change the operations of any component by using the additional code in relation to the decorated object being called.
The following is an example of decorator implementation.
CLASS doc_output DEFINITION ABSTRACT. PUBLIC SECTION. METHODS: doc_output ABSTRACT. ENDCLASS.
Read now
Unlock full access