public interface Queue {
  /**
   * adds a new object at the end of the queue
   *
   * @pre true
   * @post size()==size()@pre+1
   * @post element(size()-1)==obj@pre
   * @post @forall k: [0..size()-2] @ element(k)@pre==element(k)
   */
  void enqueue(Object obj);

  /**
   * removes the object at the front of the queue and return the object
   *
   * @pre size()>0
   * @post size()==size()@pre-1
   * @post @result==element(size()-1)@pre
   * @post @forall k: [0..size()-2] @ element(k)@pre==element(k)
   */
  Object dequeue();

  /**
   * returns the number of objects currently in the queue.
   *
   * @pre true
   * @post @nochange
   */
  int size();

  /**
   * returns the object at the front of the queue without removing it from the queue
   *
   * @pre size()>0
   * @post @result==element(0)
   */
  Object first();

  /**
   * returns the object at the end of the queue without removing it from the queue.
   *
   * @pre size()>0
   * @post @result==element(size()-1)
   */
  Object last();

}