Abstraction is to hide/reduce implementation detail. The use of an interface is an example.
You know how to use it but you don't know the implementation details. Another example is
the iterator pattern. With that pattern you can hide the data-structure without compromising
Encapsulation is the process in which internal variables are hidden and made accessible by
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Joined: Mar 09, 2009
subject: Difference b/w Abstraction and Encapsulation