|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Python |
Program
defines two properties of Arrays--data and baseIndex.
These properties provide the means to inspect
the contents of an Array object
(using the fget accessor methods)
and the means to modify
the contents of an Array object
(using the fset accessor methods).
Clearly, the running times of each of the baseIndex property fget and fset accessors is a constant. Similarly, the running time of the data property fget accessor is also a constant.

Program: Array class data and baseIndex properties.