code: public void put(ElementType x) {
          if (full()) {
              getIdx = (getIdx + 1) % elements.length;
          } else {
              size++;
          }
  
          elements[putIdx] = x;
          putIdx = (putIdx + 1) % elements.length;
      }
docs: Inserts an element and overwrites old one when full.
  @param x     element to insert