+ 1
Does Inheritence voids encapsulation?
like we shift from private attributes to protected ones if we want to use them in subclasses. can we say we are conpromising on data hiding while we are using inheritence?
1 Answer
0
No. Almost always, attributes are private and we create getters and setters to use it.
Uncle Bob is a very good reference on this topic, see some videos of him talking about OOP, outstanding.