Need Change Code Class Driver Public Class Driver Public Static Void Main String Args Syst Q37153898

D. 10 pointsUse a circular doubly linked chain to implement the ADT deque. In a doubly linked chain, the first and last nodes

* You do not need to change any code in class Driver
*
*/
public class Driver
{
   public static void main(String[] args)
   {
       System.out.println(“Create a deque:”);
       DequeInterface<String>myDeque = new CircularDoublyLinkedDeque<>();

       System.out.println(“nnisEmpty()returns ” + myDeque.isEmpty() + “n”);

       System.out.println(“Add to frontand back of deque to getn” +
              “Joe Jess Jim Jill Jane Jerryn”);
       myDeque.addToFront(“Jim”);
       myDeque.addToFront(“Jess”);

       myDeque.addToBack(“Jill”);
       myDeque.addToBack(“Jane”);

       myDeque.addToFront(“Joe”);
       myDeque.addToBack(“Jerry”);

       System.out.println(“nisEmpty()returns ” + myDeque.isEmpty() + “n”);

      

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.