Question: 3 . 2 . Include the textbook s DoublyLinkedList.java file. You will not change the DoublyLinkedList.java file. 3 . 3 . Use this to create

3.2. Include the textbooks DoublyLinkedList.java file.
You will not change the DoublyLinkedList.java file.
3.3. Use this to create an Integer doubly-linked list DLL1:
10<->9<->8<->7<->6<->5<->4<->3<->2<->1<->0
One way to start this: DoublyLinkedList DLL1= new DoublyLinkedList();
3.4. Output all the values from the DLL1 to the console.
3.5. Using DLL1.removeFirst(), move the values to a new doubly-linked list, DLL2.
Its okay to destroy DLL1 in the process.
3.6. Output all the values from DLL2 to the console.
3.7. Using DLL2.removeLast(), move the values to a new doubly-linked list, DLL3.
Its okay to destroy DLL2 in the process.
3.7.1. While moving, change all nodes with value 1 to value 5. You should not insert any nodes with value 1 into DLL3.3.7.2 While moving, change all nodes with value 8 to value 6. You should not insert any nodes with value 8 into DLL3.
3.8. Output all the values from DLL3 to the console.
Sample program output:
DLL1 is:(10,9,8,7,6,5,4,3,2,1,0)DLL2 is:(10,9,8,7,6,5,4,3,2,1,0)
DLL3 is:(10,9,6,7,6,5,4,3,2,5,0)
I am not picky about output formatting, but the values displayed must come from the nodes of the doubly-linked list, and not from the main program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!