Convert LinkedQueue into a generic class that can store objectsof any type. Use LinkedQueue class provided with the assignmentbelow.
************************************
public class LinkedQueue
{
private class Node
{
String value;
Node next;
Node(String val, Node n)
{
value = val;
next = n;
}
}
private Node front = null;
private Node rear = null;
public void enqueue(String s)
{
if (rear != null)
{
rear.next = new Node(s, null);
rear = rear.next;
}
else
{
rear = new Node(s, null);
front = rear;
}
}
public boolean empty()
{
return front == null;
}
public String peek()
{
if (empty())
throw new EmptyQueueException();
else
return front.value;
}
public String dequeue()
{
if (empty())
throw new EmptyQueueException();
else
{
String value = front.value;
front = front.next;
if (front == null) rear = null;
return value;
}
}
public String toString()
{
StringBuilder sBuilder = new StringBuilder();
// Walk down the list and append
PayPal Gateway not configured
PayPal Gateway not configured