C++ Programming - OOPS Concepts - Discussion

Discussion Forum : OOPS Concepts - General Questions (Q.No. 10)
10.
Which of the following concepts of OOPS means exposing only necessary information to client?
Encapsulation
Abstraction
Data hiding
Data binding
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
71 comments Page 4 of 8.

GAUTAM DEV said:   1 decade ago
Encapsulation means protecting data from other programmers in real programming world which can be achieved by the making data variable as private data. The private data variable can only be accessed inside the declared class if we want to allow to access the value to other programmers we provide the another way that is better and setter method for that private variable.

So by better and setter method we allow the another programmer to access the variable we doing this as Abstraction and When we declare the private methods which means we are doing encapsulation.

Rajendra said:   8 years ago
Abstraction is the correct answer.

Neha said:   7 years ago
What is the difference between abstraction and data hiding? and why the answer is data hiding and not an abstraction.

Manisha kulkarni said:   7 years ago
I think the answer should be abstraction.

Vishal Singh said:   7 years ago
First thing data hiding is a feature of OOPS Concept and not a pillar of OOPS, the question is clearly asking "Which of the following concepts of OOPS means " So, according to me, that data hiding can't be the correct answer.

Ankit said:   7 years ago
Here,

Data abstraction is the right answer.
Data abstraction means showing the essential info to the user.
Whereas data hiding is just way to hide the info from the user.
(how to achieve data hiding -- private, protected, public).

Sanjay said:   1 decade ago
Data hiding is part of data abstraction.

Shruti said:   1 decade ago
The answer is abstraction as it hides the complexities from the user and shows only the essential features. Whereas data hiding is hiding the data altogether from the user.

Sarang said:   1 decade ago
It hides the data and expose only some information which is declared in the person class but we can access it by public variable.

Anshu said:   1 decade ago
If you consider the broad meaning, data hiding may seem right. But to be very precise, DATA ABSTRACTION should be the correct answer.


Post your comments here:

Your comments will be displayed after verification.