Abstraction
First property that comes under OOPS concepts. We achieve abstraction by
a) Keeping the common things together
b) Ignoring the unnecessary details
For example :
Lets have a case where I have a bank account and you also have a bank account. If someone is writing a bank account class in application, he/she will not write two bank account classes for you and me.
So he/she will write one Bank account class by
-> Putting the common things together Like Bank account no, Balance etc.
-> Ignoring the unnecessary specific account details Like account type, opening date etc.
By this he/she will create one Bank Account class. And your bank account and my bank account will be created from that Bank Account class.
This is Abstraction in OOP.
0 Comments
Post a Comment