Define a StackByQueue class. In this class, you need toimplement a stack by using two queues you designed previously. Youneed to design and implement this class by yourself. TheStackByQueue class need the following public methods:
public class StackByQueue
Methods:
public void push(String x); // push a string into stack
public String pop(); // pop out a string from the stack
public String top(); // return the top element in the stack
public boolean isEmpty(); // return whether this stack isempty
The queues designed before based on Array:
public class MyQueue {
private int front, rear, size; // the index for firs, the indexfor last array and current size of
PayPal Gateway not configured
PayPal Gateway not configured