+ 4
Data Abstraction vs Data Hiding
Which concepts of OOPS means exposing only necessary information to client? Is it Abstraction or Data hiding I answered Abstraction... but the following site says, its Data hiding http://www.indiabix.com/cpp-programming/oops-concepts/001002 (Question no 10) But What is the exact difference between Data Abstraction and Data Hiding Pardon me if the question seems silly..
2 Respostas
+ 1
My interpretation: Abstraction can be interpreted as a result of data hiding.
The user of the class has only access to what he needs (setter, getter) while the complications are hidden away, so he/she only sees a 'summary' of what's going on, the abstraction.
+ 1
Data hiding (i interpret this as encapsulation) is where the Class make its data only accessible by itself.
Meanwhile Abstraction as HonFu said, is an interface for outside element to interact with its data without changing them directly