An important key to software productivity is software reuse. With respect to data structures, an important key to software reuse is the encapsulation of classes of data structures in ways that encourage their reuse. The most fundamental way to encourage the reuse of data structure components is to encapsulate the representations of data structures using Ada’s object-oriented programming and software packaging capabilities. Regardless of the packaging method, a client will have to construct an interface between the data structure’s encapsulation and the client’s application. For example, when a structure is encapsulated using Ada’s object-oriented capabilities, the client constructs an interface using object-oriented type extension. A type extension example appears in Section 2.5. When a data structure is encapsulated in a generic package, a client instantiates the generic package to construct the interface between the package’s data structure and the client’s software. A generic instantiation example appears in Section 2.3. Both methods provide safe, reliable, efficient, and robust encapsulation.
Unable to display preview. Download preview PDF.