RE: difference between data abstraction & encapsulatio...
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.
RE: difference between data abstraction & encapsulatio...
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)
RE: difference between data abstraction & encapsulatio...
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.
RE: difference between data abstraction & encapsulation.
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.
RE: difference between data abstraction & encapsulation.
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.