SE450
:
Preconditions
[47/57]
In circular array implementation, failure of
remove
precondition corrupts queue!
Bounded queue needs precondition for
add
Naive approach:
@precondition size() < elements.length
Precondition should be checkable by caller
Better:
@precondition size() < getCapacity()