An instance is a sequence of of elements. Methods include:

  • size(): return the number of elements in
  • isEmpty(): return true if has no elements, otherwise false
  • get(i): return the element of with index (-st element has index ) Error occurs if or .
  • set(i,e): replace with the element at index and return the old element at this index Error occurs if or .
  • add(i,e): insert a new element into to have index Error occurs if or .
  • remove(i): remove from and return the element at index Error occurs if or .