# what is abstract data type?

### 2 Answers | Add Yours

Abstract data type or ADT is a term commonly used in Computer Science to define a mathematical model for data types in which the data type is characterized not by its implementation, but by its user behavior. In other words, ADT is an object with a generic description which is independent of its implementation details.

Some examples of abstract data types are integers, real numbers, complex numbers, polynomials, maps, matrices, sets, book, multiset, multimap, queue, graph, stack, etc.

Modern programming languages provide mechanism for defining ADTs. Examples of such mechanisms include, class in Java and C++; package in Ada, etc.

To define an ADT, we define values in the type (for example, fields in a class) and the set of operations (such as methods or routines) that can be used on values of given type.

Hope this helps.

An

abstract data type as defined by NIST, abbreviatedADTis a set of data values and associated operations that are precisely specified independent of any particular implementation.

It is a logical description of how the data is viewed and the operations that are allowed without considering its implementation; its implementation is hidden. This means that only concern is the representation of data and not with how it will be constructed.

Advantages of ADT’s are that they utilize a better and more efficient problem-solving process , code is easier to understand , implementations of ADT's can be changed without requiring changes to the program that uses the ADT's and they can be reused in future programs.

Large programs evolve as a result of new requirements or constraints. A modification to a program commonly requires a change in one or more of its data structures. In order to avoid rewriting every procedure that uses the changed structure, it is useful to separate the use of a data structure from the details of its implementation. This is the principle underlying the use of abstract data types.

Some common ADT’s are stack, queue, priority queue, dictionary, sequence, set.

**Sources:**