+ 11

Is not that clear with the decorator? I slightly changed the code for a better understanding.

https://code.sololearn.com/cZZzYKGl9klL/?ref=app

19th Mar 2018, 10:20 PM
Vučko/Вучко/Vuchko
Vučko/Вучко/Vuchko - avatar
2 ответов
+ 3
Here is an example of what a decorator may be useful for: https://code.sololearn.com/cD09ijlIS6Ev/?ref=app
15th Apr 2018, 10:10 PM
Denys Yeromenko
Denys Yeromenko - avatar
+ 2
Are you trying to use the decorator design pattern? The decorator must be like a component to the class. Look online for pseudo code and more explanation on the design pattern.
19th Mar 2018, 11:03 PM
Ariela
Ariela - avatar