/** * Interface for a stack of primitive doubles. */ interface DStack { /** * Test whether this stack is empty. * @return true if stack is empty, false if not */ boolean isEmpty(); /** * Push a new item on top of this stack. * @param d value to be pushed */ void push(double d); /** * Delete the value that is on top of this stack. * @return the value that was deleted * @throws EmptyStackException if stack is empty */ double pop(); /** * Return the value that is on top of this stack without deleting it. * @throws EmptyStackException if stack is empty */ double top(); }