Implementation hiding-not just information hiding
The idea behind any class, is to give the class only what it needs/requires to give it the ability to function as the actual object is intended.
A simple example of this would be if I were to create a class Jaguar.
I first ask myself, what makes up a real world jaguar, and then redefine those traits that i must use to complete my task at hand. I say task at hand because a jaguar has most internal workings than I might be concerned with for why i need this Jaguar class. Do i need to know of the diseases a Jaguar can get, or how his digestive process works? Yes… if my current application deals with any of those specifics, but this is why you must access how much information you truly require for the task at hand.
As I begin my Jaguar class and have decided all the methods and attribute it will posses, I would like to make sure that his information will be wrapped inside cleanly and well, so that nothing or no body will be able to screw my class up by enabling him to be something other than I intended.
The best way problematically is to make every attribute and every method private or protected. This will ensure that nothing and i mean nothing outside other than the jaguar will be able to change his behavior.
By applying private or protected is a great way to keep my jaguar a jaguar, but does not do a very good job at allowing other classes to interact with it.
Sure the jaguar is not a domesticated animal but suppose I created it to be a kitten and then created a boy to be able to love him. I gave the jaguar the ability to purr when hes being pet by adjusting his internal state from being (Jaguar.SLEEPING) to (Jaguar.PETTED) and i gave the boy a property to pet a Jaguar class. I expect from knowing that I gave the jaguar the ability to Purr that he will when the boy pets him, but unfortunately nothing has triggered the Jaguar.PETTED state, because nothing was able to interact with the Jaguar class because all attributes and methods are marked private.
So as you see I can not rely on using private or protected or even final to be what enforces my jaguar to remain a jaguar unless i want very little interaction with other classes.
So to involve interaction i need to expose methods or properties. This is where Implementation hiding/Information hiding will help us to enforce what is able to be modified.
Expose ONLY what must be exposed to allow another class to interact with our Jaguar class, but where the Jaguar is still in control of his own internal workings.