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 nodes for a doubly linked list.

//----------------------------------------------------------------------------

package support;

public class DLLNode extends LLNode

{

private DLLNode back;

public DLLNode(T info)

{

super(info);

back = null;

}

public void setBack(DLLNode back)

// 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

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!