Abstract Data Types
For today, here's what you need to know about abstract data types:
- A data type consists of a set of values that are related in the sense that the same set of operations (or methods) apply to them.
- To use a concrete data type, you have to know something about how values of that data type are represented.
- To use an abstract data type, you only have to know how values of that data type behave with respect to the set of applicable operations.
- You can and should use abstract data types without knowing how they're represented or implemented.
In fact, you're better off not knowing. That's the principle of information hiding, which we'll discuss in more detail next week.