Invariant for Revised Bag ADT
The number of items in the bag is in the member variable used.
The actual items of the bag are in a partially filled dynamic array, pointed to by the member variable data.
The total size of the dynamic array is in the member variable capacity.