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:
72 comments Page 6 of 8.

Vivek kumar said:   1 decade ago
According to me answer should be abstraction because it hides the complexity from the user and provides the required information to the user.

Def said:   1 decade ago
As we are showing only essential information to the client why it can't be abstraction. A/q to the definition it should be. Please clear b/w abstraction and data hidding.

Vishnu said:   1 decade ago
Data Encapsulation : It is the process of binding of the data and functions together as a single unit.
Data Abstraction : It is the process of exposing only the interfaces and hiding the other details from the user.

Avin said:   1 decade ago
Abstraction is the concept used for showing only essential information while encapsulation (i.e. data hiding) is a concept used for hiding the irrelevant information from the user.

These two concepts work together in any application.

E.g. In an ATM machine, the whole process is hidden from us (Encapsulation) while only read info is given to us like our balance etc. (Abstraction)

Anu said:   1 decade ago
What is the difference between abstraction and data hiding ?

Vaghasiya Hiren K. said:   1 decade ago
Because the data hiding was one concept of security in OOP.

Than only necessary information to client provided by data hiding.

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.

K2u2007 said:   1 decade ago
Declaring data members with access specifier private is known as data hiding. When a program creates a GradeBook object, data member courseName is encapsulated (hidden).

In the object and can be accessed only by member functions of the object's class. In class GradeBook, member functions setCourseName and getCourseName manipulate the data Member courseName directly.

HINA said:   1 decade ago
According to me abstraction is the correct answer because abstraction focuses on the main aspect of the application and hide the internal details so that it will be more flexible for the user to use.

Aravind said:   1 decade ago
Write a simple single program to diff b/w data hiding and abstraction?


Post your comments here:

Your comments will be displayed after verification.