Software and Applications (non-game)
Computer Programming
The Difference Between

What is difference between encapsulation and abstraction and how are they related to each other?

User Avatar
Wiki User
July 17, 2015 5:56PM

Encapsulation is hiding the details of the implementation of an object so that there are no dependancies on the particular implementation.

Abstraction is removing some distinctions between objects, so as to showing their commonalities

Encapsulation is wraping data into single unit (eg. class)

Abstraction is hiding unessential parts and showing only essential data.

(eg. student class- name, age are essential parts while height, weight are not essential, so hiding information of height and weight)