Fields
- filledElements : the number of non-null elements in a list
- list : holds a reference to an array of Objects
- INITIAL_CAPACITY : starting length of list
Constructors
- List_inArraySlots(): instantiates new list of Objects with initial capacity
Methods
- size() : returns number of non-null elemeents
- toString() : returns string representation of the array
- add() : adds a reference to an instance of Object to next slot in the list
- get() : returns the value given its index
- expand() : doubles the size of the array
UserOfList tests instantiation, size(), expand(), and add.