Last post May 27, 2014 12:23 PM by akfkmupiwu
May 27, 2014 11:32 AM|duckkiller53|LINK
Could someone help. I need to describe three methods of encapsulating classes.
May 27, 2014 12:23 PM|akfkmupiwu|LINK
This is very good and tricky one!
I can suggest below (open to argument);
1. "Because inheritance exposes a subclass to details of its parent's implementation, it's often said that 'inheritance breaks encapsulation'". (Gang of Four 1995:19) , if this is so then you can use Dependency Injection via setter of Interface Type, also
as an encapsulation example :)