What is the difference between the Encapsulation and
Abstraction

Answers were Sorted based on User's Feedback



What is the difference between the Encapsulation and Abstraction..

Answer / rohini

Encapsulation means we hide the data from directly
interaction and Abstraction means
we bother about what the object can do but don't bother
about how it does?

Is This Answer Correct ?    78 Yes 19 No

What is the difference between the Encapsulation and Abstraction..

Answer / k.ramaswamy

Encapsulation means we are hiding the code and data in to a
single unit to protect the data from outside world.

Abstraction means we know about the object how it can be
used but we dont know how it is implemented. and we can
hide the data using the AccessSpecifiers.

Is This Answer Correct ?    56 Yes 12 No

What is the difference between the Encapsulation and Abstraction..

Answer / amrut

Encapsulation is nothing but showing only those things
which are required by wrapping up complexity & hence it is
also called that it leads to data hiding but its not data
hiding. Never say its data hiding… its wrapping up
complexity in one capsule that is class & hence
Encapsulation…
While abstraction denotes the essential characteristics of
an object which differentiates from other kinds of object...

Abstraction is achieved by making class abstract having one
or more methods abstract. Which is nothing but essential
characteristic which should be implemented by the class
extending it.
e.g. when you inventing/designing a car you define a
characteristics like car should have 4 doors, break,
steering wheel etc… so anyone uses this design should
include this characteristics. Implementation is not the
head each of abstraction. It will just define
characteristics which should be included.

Encapsulation is achieved keeping data and the behaviour in
one capsule that is class & by making use of access
modifiers like public, private, protected along with
inheritance, aggregation or composition. So you only show
only required things, that too, only to the extent you want
to show. i.e. public, protected, friendly & private...
e.g. GM decides to use the abstracted design of car above.
But they have various products having the same
characteristics & doing almost same functionality. So they
write a class which extends the above abstract class. It
says how gear box should work, how break should work, how
steering wheel should work. Then all the products just use
this common functionality. They need not know how the gear
box works or break works or steering wheal works.
Indivisual product can surely have more features like a/c
or auto lock etc…..

Is This Answer Correct ?    17 Yes 1 No

What is the difference between the Encapsulation and Abstraction..

Answer / arunkumar

Encapsulation means combine the data and its associated
methods.By using encapsulation we can hide the data from
outside of class.

Abstraction means it hides the unnecessary data and it shows
the essential data

Is This Answer Correct ?    13 Yes 2 No

What is the difference between the Encapsulation and Abstraction..

Answer / thirumalesh

Encapsulation is process of binding data into single unit
which hides the implementation for an objects..
this is achieved by
class <name>
{
//member variables
//member functions
};
class binds all the code implementation..
and Abstraction is a process of hiding/denied permission to
use data of one class to other class (inherited)
this is achieved by private keyword in class..

Is This Answer Correct ?    10 Yes 0 No

What is the difference between the Encapsulation and Abstraction..

Answer / ramaraju

Encapsulation is a process of binding data and methods into
a single unit.

Abstraction is a process where by we identify important
aspects of phenomenon and ignoring its details.

Is This Answer Correct ?    17 Yes 9 No

What is the difference between the Encapsulation and Abstraction..

Answer / abc

encapsulatin is hiding the internal data and methods from
the outside world.
Abstraction is binding the similar data and methods which
can be accessible by its subclassess

Is This Answer Correct ?    8 Yes 0 No

What is the difference between the Encapsulation and Abstraction..

Answer / rajendar gunnala

Encapsulation: Related data and relevant functionality make
it as a unit to protect the data from outside world.

Abstraction : Client is abstracted from implementation.
class only exposes only interfaces ans hides implementation.

Is This Answer Correct ?    10 Yes 4 No

What is the difference between the Encapsulation and Abstraction..

Answer / trinadh

Encapsulation which when implemented properly makes a
programmer's class must more secure as he gives only class
behaviours but not instance variables to maniplate state
of an object.
Abstraction wil gives only required information among all
informations

Is This Answer Correct ?    6 Yes 0 No

What is the difference between the Encapsulation and Abstraction..

Answer / amruta

in encapsualtion i m hiding what the data is i.e i m
binding them into a single unit...i can use access
specifiers to do it.
but in abstraction i can see wht the mathods are but cant
see the actual implementation..i.e i cant understand what
it is but not understand it how it is..

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More MFC Interview Questions

1)How to load an icon on a button as Dynamically ?

1 Answers   HCL,


What is the difference between regular dlls and extended dlls?

2 Answers  


1) How do you Destroy a Dialog Box ?

2 Answers   Honeywell,


if i modified data in 1 view how does the other view knows

2 Answers   Siemens,


what is message loop how mfc does it internally?

4 Answers   Aspire,






If there is more than 100 control in a window how we can change the Taborder of a controls

4 Answers   Satyam,


how many types of messages are their

4 Answers   E Logic, TCS,


what if we provide two message handler for same message ?

1 Answers  


how can u change button shape at run time

3 Answers   Samsung,


1)set the Title for The File DialogBox, in MFC?

1 Answers  


What is the difference between Extension DLL and Regular DLL?

6 Answers   GE,


In VC++ How to transfer between one exe to another exe while running..

5 Answers   Wipro,


Categories