The set of possible values that an instance can take (i.e.,
the domain or carrier set); and
The set of allowable operations on its instances
An Observation:
Each ADT can be implemented in more than one way
Implementation of an ADT
Defined:
A realization in computer memory (called a
data structure) of the values; and
An executable realization of a mechanism
(called an algorithm) for performing
each of the operations
An Observation:
In an object-oriented language, an ADT is usually implemented
as a class
Data Structures
Contiguous Implementations:
Values are stored in adjacent memory
locations
Linked Implementations:
Values are "connected" using pointers
or references
Note: Many books call these "linked list" implementations.
This is inappropriate since a "list" is an ADT and, hence,
a "linked list" is a particular way of implementing a "list".