You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
627 B
15 lines
627 B
// The NumberStack interface
|
|
// Do not make any changes to this file!
|
|
// Xiwei Wang
|
|
|
|
public interface NumberStack
|
|
{
|
|
boolean isEmpty(); // check whether the stack is empty
|
|
boolean isFull(); // check whether the stack is full
|
|
int top(); // return the element at the top of the stack
|
|
int pop(); // remove and return the element at the top of the stack
|
|
void push(int v); // push a value onto the stack
|
|
int size(); // return the number of elements on the stack
|
|
@Override
|
|
String toString(); // return a string representation of the stack
|
|
}
|