hello to all
can any one explain me in detail with real world example as well as with the help of program
the difference between data abstraction and data encapsulation.
and make me right if i m wrong:
according to me data encapsulation is data hiding
and data abstraction is providing the essential details of an object by ignoring the irrelevant details of an object.
in my opinion abstraction and encapsulation goes side by side i.e whenever there is encapsulation there must be the abstraction
for ex: playing pc games, withdrawing money from ATM.
ex of program
please take me out of this question if i had given wrong answer because it is the very basic concept and i want to clear this concept as soon as possible
posted 5 years ago
Encapsulation is all about handling the details, of a bank account, for example.
The attributes of a bank account (e.g. owner, type, bank, balance, transaction
dates, etc.) are encapsulated in a class where operations can be performed on
them. The associated abstraction is the concept of a bank account. It is useful
when discussing bank accounts more generally; new accounts, accounts closed
this month and so on. An abstraction is a summary label for a set of details that