Data Structures and Algorithms
with Object-Oriented Design Patterns in Java
Program
defines three Array class accessor methods.
The methods getData, getBase, and getLength provide a means
for the user to inspect the contents of the Array object.
Such methods are known as accessors .
Clearly, the running times of each of these accessors is a constant.

Program: Array class accessor methods.
Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.