I am studying Decorator design pattern at the moment and this thinking bother me a lot.
Would it be easier just to have one base class with boolean value corresponding to its feature?
For example: The textview, can have vertical scroll, horizontal scroll, border, etc. if the textview base class has the BOOL for canVerScroll, canHorScroll, hasBorder; why is this not better than Decorator design pattern?
Thanks for helping!
Aucun commentaire:
Enregistrer un commentaire