+ 1
What is recommended private or protected
I see a contradiction between encapsulation and inheritance, what do you think?
5 Answers
+ 7
depends on requirements
+ 1
You will be better with practice. I don't see any contradiction. It is easier when you have UML diagrams.
You see contradiction on a virtual level which is probably your Brain's representation of these concepts but in fact they are program and program can handle parallel tasks better than humans.
+ 1
Nop no contradiction, in general use private for attributes and implement get and set methods public or protected, depend you want
+ 1
Virtually there's no contradiction
0
its depends