public interface Stack {
  /**
   * adds a new object onto the top of the stack
   *
   * @pre true
   * @post size()==size()@pre+1
   * @post top()==obj@pre
   */
  void push(Object obj);

  /**
   * removes the object at the top of the stack and return the object
   *
   * @pre size()>0
   * @post size()==size()@pre-1
   * @post @result==top()@pre
   */
  Object pop();

  /**
   * returnes the numbers of objects currently in the stack
   *
   * @pre true;
   * @post @nochange
   */
  int size();

  /**
   * returns the object at the top of the stack without removing it from the stack
   *
   * @pre size()>0
   * @post @nochange
   */
  Object top();
}


