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
Get step-by-step solutions from verified subject matter experts
