1. void push(int): 將一個節點加入堆疊的頂部；

2. int pop(void): 從堆疊頂部的節點移除；

3. int top(void): 檢查堆疊頂部節點的值；

4. bool isempty(void): 檢查堆疊是否為空；

5. void reverse(Stack &): 將堆疊反向倒置

6. ostream &operator<<(ostream&, const Stack&)：友函式，從底部至頂部輸出堆疊中所有節點的值。

1. 將一個節點加入堆疊的頂部；

2. 從堆疊頂部的節點移除；

3. 測試堆疊是否為空的；

4. 從底部至頂部輸出堆疊中所有節點的值；

5. 終止程式執行。

 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 20 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 15 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 4 The stack elements are (from bottom to top):     20     15     30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 2 The poped element: 30 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 3 The top element: 15 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 1 Input the element being pushed: 10 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 4 The stack elements are (from bottom to top):     20     15     10 **************************************** 1. Push an elemnet to the stack2. Pop an element from the stack 3. Print the top element 4. List all stack elements 5. Exit the program Input command: 5