Question
Design, implement, and test a doubly linked list ADT, using DLLNode objects as the nodes, In addition to our standard list operations, your class should
Design, implement, and test a doubly linked list ADT, using DLLNode objects as the nodes, In addition to our standard list operations, your class should provide for backward iteration through the list. To Support this operation, it should export a resetBack method and a getPrevious method. To facilitate this, you may want to include an instance variable last that always references the last element on the list.
//----------------------------------------------------------------------------
// DLLNode.java by Dale/Joyce/Weems Chapter 7
//
// Implements
//----------------------------------------------------------------------------
package support;
public class DLLNode
{
private DLLNode
public DLLNode(T info)
{
super(info);
back = null;
}
public void setBack(DLLNode
// Sets back link of this DLLNode.
{
this.back = back;
}
public DLLNode getBack()
// Returns back link of this DLLNode.
{
return back;
}
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started