public interface Vector { int size(); boolean isEmpty(); T elemAtRank(int r) throws VectorOutOfBoundsException; void replaceAtRank(int r, T elem) throws VectorOutOfBoundsException; void insertAtRank(int r, T elem) throws VectorOutOfBoundsException; T removeAtRank(int r) throws VectorOutOfBoundsException; }