I'm trying to create a list stack that implements some interface called SomeList
The list stack should only use stack with no links. the itnerface has a number of methods that I would like to implement.
So for SomeList I have something like
public interface SomeList<T>{public void plus(T something);public E takeout(int somewhere); and so on}
For the generic ListStack I have something like
public class ListStack<T> implements SomeList<T>{
Stack<T> stack1=new Stack<E>();
//constructor
public LinkStack(){
stack1=new Stack<T>();
}
//method
public void plus(T somethig){
this.push();}
.
.
.
}
In the method above (plus(T something)) I get an error on push. Eclipse tells me to create a new method called push.
I want a new stack to be created whenever someone creates a stack list object
Any ideas on how to do this?