Thursday, 17 December 2015

Data Abstraction

Refers to the act of providing only required features and hiding all the non-essential details for usage.
Data abstraction is a programming (and design) technique that relies on the separation of interface and implementation.
Benefits of Data Abstraction:
Data abstraction provide two important advantages:
1.Class internals are protected from inadvertent user-level errors, which might corrupt the state of the object.
2.The class implementation may evolve over time in response to changing requirements or bug reports without requiring change in user-level code.
ADT stands for Abstract data types.
Classes which provide data abstraction are referred to as ADTs.
Below fig shows an ADT which consists of an abstract data structure and operations. Only the operations are viewable from the outside and define the interface.


Post a comment