Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using DrJava create a program that does the following: A deque (pronounced \"dec

ID: 3823862 • Letter: U

Question

Using DrJava create a program that does the following:

A deque (pronounced "deck") is a list-based collection that allows additions and removals to take place at both ends. A deque supports the operations

addFront(x)

removeFront( )

addRear(x)

removeRear( )

size( )

empty( )

Write a class that implements a deque that stores strings using a doubly-linked list that you code yourself. Demonstrate your class with a graphical user interface that allows users to manipulate the deque by typing appropriate commands in a JTextField component, and see the current state of the deque displayed in a JTextArea component. Consult the documentation for the JTextArea class for methods you can use to display each item in the deque on its own line.

This should have three separate source files. A source file for

A Deque Class

A doubly DoublyLinkedlist Class

A GUI that allows users to manipulate your deque GUIdeque Class

Thank you to anyone who takes the time to help!

Explanation / Answer

{

Node n;

boolean isSorted=false;

for(int i=lenght-1; i>1 && isSorted==false; i--)

{          

for(int j=0; j<i; j++)

{

n=L.head;

isSorted=true;

for(int k=0; k n.next.data)

{

isSorted=false;

swap(n, n.next);

   }

}

    }

}

static void swap(Node N1, Node N2)

{

    int temp=N1.data;

    N1.data=N2.data;

    N2.data=temp;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote