Difference between data abstraction & encapsulation.

Showing Answers 1 - 22 of 22 Answers

dhivya

  • Oct 27th, 2006
 

Data Abstraction is removing unneccessary datas.

Data Encapsualation is wrapping up the data into the single frame called class,for further reuseablity.

DEEPAK KUMAR MAHAPATRA (TCS KOCHI)

  • Nov 21st, 2006
 

Hii

DIFFERENCE

1.REPRESENTATION OF ESSENTIAL FEATURE WITHOUT INCLUDING THE BACKGROUND DETAIL IS CALLED DATA ABSTRACTION WHILE COLLECTION OF ALL DATA AND METHOD INTO A SINGLE UNIT CALLED ENCAPSULATION

2.IN DATA ABSTRACTION WE WERE IGNORE ABOUT THE DETAILS REGARDING AN OBJECT TYPE WHILE ENCAPSULATION DESCRIBE DETAILS INFORMATION ABOUT AN OBJECT TYPE.

BY

DEEPAK(KOCHI TCS)

Lokesh

  • Jan 4th, 2007
 

Can someone give small example for this:
In Data Abstraction we ignore about the details regarding an object type while Encapsulation describe detail information about an object type.

  Was this answer useful?  Yes

chandrasekhar vuppu

  • Jan 22nd, 2007
 

Abstraction is the ability to generalize an object as a datatype that has specific set of characterstics and specific actions.

Encapsulation is the process of localizing or hiding of information and process within the object. so that an object of a class can be served as black box the users. Best example for encapsulation is a class object (its a combination of interface,behaviour and implementation)

  Was this answer useful?  Yes

Mohit Singhal

  • Nov 8th, 2007
 

A very simple example could be:

In case of a car, a brake shows Abstraction in the way that it provides an interface that has contract to stop the car & shows the encapsulation in the way, how the components are fixed into the brake system to provide the functionality.

  Was this answer useful?  Yes

faran

  • May 28th, 2008
 

Abstraction: We don't have to bother about the data type of the object while accessing it.
Encapsulation: We put all the correlated data and methods in a class.

Faran Shabbir

  Was this answer useful?  Yes

Abstraction:
Denotes the essential properties and behaviour of an object that differentiate it from other objects. e.g: We use objects but we're not concerned with whats going behind the scene.

Encapsulation:
Its a process of binding the data and its behaviour into a single entity ie: class, which makes as a reusable component in later part of the application development.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions