Friday, 4 July 2014

What is the Abstraction?

           A class contain lot of data and the user does not need entire data. The User required only some part of the available data. In this case, we can hide the unnecessary data from the user  and expose only that data is of interest to the user. This is called Abstraction.

Example:
           A bank clerk should see the customer details like account no.r, name and balance of amount in the account. He should not see the entire sensitive data like the staff salaries, profit or loss of the bank, interest of amount paid by the bank and etc.. So such data can be abstracted from the clerk's. Where as the bank manager is interested to know this data it will be provided by the manager.

Advantage:
           The advantage of abstraction is the every user will get his own view of the data according his requirement and he will not get confused with unnecessary data.
           

No comments:

Post a Comment