Write anLLStack class that implementstheStack interface given below using alinked list rather than an array (as done
Question:
Write an LLStack
public interfaceStack
{
// push an item onto the stack
void push(E element);
// pop an item from the stack (and return theitem)
E pop();
// return the item on top of the stack (withoutpopping)
E peek();
// returns whether the stack is empty
boolean isEmpty();
// returns the stack contents as astring
String toString();
}
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr