Stack Generic#10632

Stack Generic

1 second
128 megabytes
Very easy

Implement a generic Stack.

Implement the interface Stackable<>.

Implement the class MyStack<> based on the Stack data structure, such that it implements the interface Stackable<>.

Java

interface Stackable<T> 
{
  void push(T value); // push an element to the top of the stack
  T pop();            // remove and return the element from the top of the stack 
  T peek();           // return the element at the top of the stack 
  boolean Empty();    // check if the stack is empty
  int size();         // return the size of the stack
}

class MyStack<T> implements Stackable<T> 
{
  public Stack<T> s;
   ...
}

C++

template <class T>
class Stackable
{
public:
  void push(T value); // push an element to the top of the stack
  T pop();            // remove and return the element from the top of the stack
  T peek();           // return the element at the top of the stack
  bool Empty();       // check if the stack is empty
  int size();         // return the size of the stack
};

template <class T>
class MyStack : public Stackable<T>
{
public:
  stack<T> s;

};

\

Input

This problem does not require input.

\

Output

This problem does not require output.