import MyStack; class MyNode { Object item; MyNode next; MyNode(Object it) { item = it; next = null; } MyNode(Object item, MyNode next) { this.item = item; this.next = next; } } public class MyListStack extends MyStack { MyNode list = null; public MyListStack() {} public void push(Object item) { list = new MyNode(item, list); } public Object pop() { Object obj = list.item; list = list.next; return obj; } public boolean empty() { return list == null; } }