Encapsulation
Encapsulation is hiding of process; hence you hide the data. Not the vice versa.
for example : The Coffee Vending Machine encapsulates the internal process and the ingredients (data) used in the process.
Abstraction
Abstraction is a concept which facilitates to extract out the essential information of an object.
for example
for more information please click here
Encapsulation is hiding of process; hence you hide the data. Not the vice versa.
for example : The Coffee Vending Machine encapsulates the internal process and the ingredients (data) used in the process.
Abstraction
Abstraction is a concept which facilitates to extract out the essential information of an object.
for example
So, what exactly an Abstraction is?
Abstraction facilitates the easy conceptualization of real world objects, by eliminating the unnecessary details of the object. Unnecessary details? Yes, all the similar objects when you generalize, you will drop the uncommon details about the objects.
E.g., when you model a generic prototype for CRT Television & a Plasma Television, you look for details like Type of screen, Height, Width, thickness etc.; these are necessary details for a Television. But a Television object doesn't need to have details of what kind of Electron it will bean to power the CRT, what kind of liquid plasmas it will use to power the Plasma TVs. These kinds of details are unnecessary details.
for more information please click here