+ 4
What is the actual difference between abstraction and encapsulation? Please explain with real life example
3 Réponses
+ 6
abstraction is providing only the overview but not the implementation details.
For example ,a customer is provided only necessary information about how to drive a car but not about the different parts and working.
where as encapsulation is binding up of classes so as to protect them against unauthorised access.
For example bank lockers which can be accessed only by authorized person.
+ 1
as far above mentioned 👆abstraction is providing only the overview but not the implementation details.
For example ,a customer is provided only necessary information about how to drive a car but not about the different parts and working.
while encapsulation refers to hiding the information
that you do not want to provides to the main program directly
0
thanks....It's really easy to understand