Difference between Abstraction and Encapsulation


It is virtual class design.
Representation of data that how we represent it.
Before actually defining class developer will think about about the properties, methods and events will be there in class.


Hiding of unnecessary data.
At the time of class definition developers will think about which should display to end user and which should not.

Abstraction is collection of data and Encapsulation is exposure of data in appropriate access specifier.

No comments: