Answered You can hire a professional tutor to get the answer.

QUESTION

Create a class called Deque that implements a deque, using a doubly-linked circular list with a head node.

Create a class called Deque that implements a deque, using a doubly-linked circular list with a head node. Instances of Deque must be able to hold objects whose type is given by a class parameter Base.

class Deque <Base>

Your class Deque must have a private nested class called Node.

private class Node {

    private Base object;

    private Node left;

    private Node right;

    private Node(Base object) {

      this.object = object;

      left = null;

      right = null;

    }

  }

The class must have the following methods.

• public Deque()

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question