Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1997 Springer Science+Business Media New York
About this chapter
Cite this chapter
Beidler, J. (1997). Encapsulation. In: Data Structures and Algorithms. Undergraduate Texts in Computer Science. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-1854-8_2
Download citation
DOI: https://doi.org/10.1007/978-1-4612-1854-8_2
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4612-7312-7
Online ISBN: 978-1-4612-1854-8
eBook Packages: Springer Book Archive