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?
Discussion:
71 comments Page 1 of 8.
AJEET GUPTA said:
4 years ago
Data hiding:
Data hiding is hiding the details of internal data members of an object. Data hiding is also known as Information hiding.
Abstraction:
It can be defined as the separation of unnecessary details or explanations from system requirements so as to reduce the complexities of understanding requirements.
Encapsulation:
It is a mechanism that puts the data and function together. It is the result of hiding the implementation details of an object from its user. The object hides its data to de accessed by only those functions which are packed in the class of that object.
Dynamic Binding:
Dynamic binding is the process of resolving the function to be associated with the respective functions calls during their runtime rather than compile time.
Data hiding is hiding the details of internal data members of an object. Data hiding is also known as Information hiding.
Abstraction:
It can be defined as the separation of unnecessary details or explanations from system requirements so as to reduce the complexities of understanding requirements.
Encapsulation:
It is a mechanism that puts the data and function together. It is the result of hiding the implementation details of an object from its user. The object hides its data to de accessed by only those functions which are packed in the class of that object.
Dynamic Binding:
Dynamic binding is the process of resolving the function to be associated with the respective functions calls during their runtime rather than compile time.
(11)
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.
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.
Vishwanath said:
1 decade ago
Abstraction which denotes/shows the essential characteristics of an object which distinguish it from all other kinds of objects.
Ex. Consider a person details.
Doctor needs || Interviewer needs
>name of patient || >name of candidate
>age of patient || >Qualification of candidate
>height || >Result
>Blood pressure || >Skills etc.
>weight
etc.
Both of above doctor and interviewer needs the information of person but with different aspect.
Ex. Consider a person details.
Doctor needs || Interviewer needs
>name of patient || >name of candidate
>age of patient || >Qualification of candidate
>height || >Result
>Blood pressure || >Skills etc.
>weight
etc.
Both of above doctor and interviewer needs the information of person but with different aspect.
(1)
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)
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)
ROOPESH said:
1 decade ago
Encapsulation: The wrapping up of data and functions into a single unit is called encapsulation.
Abstraction: Abstraction refer to the act of representing the essential features without including the background details.
Data hiding: The data is not accessible to any other function except the function which is binding to that data.
So the answer is B (ABSTRACTION) not c.
Abstraction: Abstraction refer to the act of representing the essential features without including the background details.
Data hiding: The data is not accessible to any other function except the function which is binding to that data.
So the answer is B (ABSTRACTION) not c.
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.
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.
MetallicA said:
1 decade ago
Abstraction is showing the details that are necessary (not hiding anything) , that defines an object as unique separating from anything else. Ex - car has a steering, 4 wheels etc.
Encapsulation is binding data and methods into one functioning unit.
Data hiding is simply hiding data to be accessed by outside world, achieved by private and protected modifiers.
Encapsulation is binding data and methods into one functioning unit.
Data hiding is simply hiding data to be accessed by outside world, achieved by private and protected modifiers.
Shalu gupta said:
1 decade ago
In my opinion abstraction is right answer. Because abstraction shows only essential feature. And its also hide the complexity. Without including background detail.
And in the question asking exposing only necessary information. Nd in data hiding hiding all the complex processing. And make your work simple. Its not shows essential feature.
And in the question asking exposing only necessary information. Nd in data hiding hiding all the complex processing. And make your work simple. Its not shows essential feature.
Vedanti said:
9 years ago
Abstraction is showing only required data to users. The data not to be shown is hidden by default.
While data hiding is specifying the type of access to data. Which may not affect users operation or user may not require. But we can decide the access and if access is given we can see the data which is not the case with abstraction.
While data hiding is specifying the type of access to data. Which may not affect users operation or user may not require. But we can decide the access and if access is given we can see the data which is not the case with abstraction.
Sparsh said:
6 years ago
This should be Abstraction:
Definition of abstraction: In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.
Definition of abstraction: In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.
(2)
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers