
Prelab Activities
Review
Abstract Data Structures and Implementation Structures
We have talked about abstract data types (ADTs) and their implementations. Often
there are many ways that an ADT can be implemented. For example, our ADT Money
was implemented as class Money with two data fields: dollars and cents. ADT
Money could just as easily have been implemented with only one data field: cents or
dollars. Functions GetDollars and GetCents could calculate their return value
from this one field.
We implemented our ADT List (both unsorted and sorted versions) using both an
array-based implementation and a linked implementation. The array-based
implementation ...