Implementation-hiding
Another important concept to do with encapsulation is implementation-hiding. The idea behind implementation-hiding is to hide the inner workings of the function from the outside world. Let's take a look at an example to understand this concept.
In our everyday life, we meet and interact with many people. When we ask how someone is feeling or the name of their new pet, that person exhibits some behavior to provide the answers to our questions, such as saying I am fine, thank you! or My cat's name is Catty. The information about which language this information was stored in that person's brain and how they processed this information is hidden from the outside world.
Similarly, every smartphone contains an address book ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access