Abstract Data Type

Table of Contents

Abstract Data Type

The data structure can only be accessed with defined operations. This set of operations is called interface and is exported by the entity. An entity with the properties just described is called an abstract data type (ADT).

Definition (Abstract Data Type) An abstract data type (ADT) is characterized by the following properties:

  1. It exports a type.
  2. It exports a set of operations. This set is called interface.
  3. Operations of the interface are the one and only access mechanism to the type’s data structure.
    • It is a tool for specifying the logical properties of a data type. The term ADT refers to the basic concepts of defining the data.
    • Abstract data type is a collection of data elements and their accessing
    • An ADT is organized in such a way that the specification of the values and operations on those values are separated from the representation of the values and the implementation of the operations.

For example, a list can be viewed as an abstract data type. A list is basically a collection of element which can be ordered of unordered. The primitive operation on a list may include adding new elements deleting elements, determining number of element in the list and applying a particular process to each element in the list. Here, we are not concerned with row a list is represented and how these operations are implemented. We only need to know what is a list whose element are given and what can we do with the list.

The data structure can only be accessed with defined operations. This set of operations is called interface and is exported by the entity. An entity with the properties just described is called an abstract data type (ADT).

Figure shows an ADT which consists of an abstract data structure and operations.

Only the operations are viewable from the outside and define the interface.

ADTs are used to define a new type from which instances can be created. As shown in the list example, sometimes these instances should operate on other data types as well.

As ADTs provide an abstract view to describe properties of sets of entities, their use is independent from a particular programming language.

ADTs allows the creation of instances with well-defined properties and behaviour. In object-orientation ADTs are referred to as classes. Therefore a class defines properties of objects which are the instances in an object-oriented environment.

ADTs define functionality by putting main emphasis on the involved data, their structure, operations as well as axioms and preconditions.

You May Like to Browers More