Link to home
Start Free TrialLog in
Avatar of Nusrat Nuriyev
Nusrat NuriyevFlag for Azerbaijan

asked on

8. Explain encapsulation principle.

Explain encapsulation principle.
Provide the best and comprehensive examples/analogues of encapsulation.
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nusrat Nuriyev

ASKER

Yeah, it's hard to explain. I've personally faced with this while trying to explain to my students.
Could you provide childlike explanation? :) Maybe, by providing some analogue from the life :)

>>> The basic idea behind that is to allow code changes that don't affect other people's code in the 1st place
on the 1-st place, you do mean by priority of importance of encapsulation language feature?

Could we say, that encapsulation is kind of language featured code protection mechanism, which defends code which should not be changed, unless you know what you are doing, it protects internal mechanisms of the entity which regular user (for example, another class, what else?) must not be aware of?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial