Lo1 Abstract Data Type
Lo1 Abstract Data Type
operations supported on them, and the types of parameters of the operations. An ADT specifies
what each operation does, but not how it does it. Typically, an ADT can be implemented using one of
many different data structures.
Abstract Data Type(ADT) is a data type, where only behavior is defined but not implementation.
Opposite of ADT is Concrete Data Type (CDT), where it contains an implementation of ADT.
Examples: Array, List, Map, Queue, Set, Stack, Table, Tree, and Vector are ADTs. Each of these
ADTs has many implementations
an abstract data type (ADT) is a mathematical model for a certain class of data structures that have
similar behavior ; or for certain data types of one or more programming languages that have similar
semantics. An abstract data type is defined indirectly, only by the operations that may be performed
on it and by mathematical constraints on the effects (and possibly cost) of those operations.
In slightly more concrete terms, you can take Java's List interface as an example. The interface
doesn't explicitly define any behavior at all because there is no concrete List class. The interface only
defines a set of methods that other classes (e.g. ArrayList and LinkedList) must implement in order to
be considered a List.