An Abstract Data Type (ADT) specifies
- A set of operations (syntax) with meaning
- How the operations affect the state of the ADT (semantics)
For example, a stack (think of a stack of plates) includes
the operations to :
- create an empty stack
s
- add an item
- remove the item that was added, assuming there is one
- tell whether or not the stack is empty