gudii9
asked on
Encapsulation and abstraction
hI,
How is Encapsulation is different/similar from abstraction. Both seems almost same to me. when and where and how to use each one in the real world
Please advise
Any links resources ideas highly appreciated. Thanks in advance
How is Encapsulation is different/similar from abstraction. Both seems almost same to me. when and where and how to use each one in the real world
Please advise
Any links resources ideas highly appreciated. Thanks in advance
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Encapsulation and abstraction go together - usig a class itself means encapsulation.
Now, these are OO concepts . You still have to read my answer and think about it more and more.
The purpose of making a method abstract is to let subclasses override and implement it . Making it private would not allow the subclasses to acces it .So, you can't have a private abstract method.
Now, these are OO concepts . You still have to read my answer and think about it more and more.
The purpose of making a method abstract is to let subclasses override and implement it . Making it private would not allow the subclasses to acces it .So, you can't have a private abstract method.
ASKER
ABSTRACTion with ABSTRACT classes, interfaces and jdbc interface concept
>>They both achieve the same thing , but the purpose is different
eventhough same thing does the path/way to achieve the purpose is same or different?
private methods could be abstract and vice versa right.
Practically can we use both encapsulation and abstraction together same time?
Please advise