Question
In Java Program, please. This class is to be named BridgesDoublyLinkedList and it must implement the provided List.java class. Test your implementation thoroughly and i
In Java Program, please.
This class is to be named BridgesDoublyLinkedList
add 35 Strings, test all the methods in the interface within the main method of your BridgesDoublyLinkedList class.
Use the following instance variables:
head //first node in the list
tail //last node in the list
current //element that will be used when moving through the list
size //size of the list
//List class ADT. Generalize the element type using Java Generics. public interface List
// Insert "it" at the current location // The client must ensure that the list's capacity is not exceeded public boolean insert(E it);
// Append "it" at the end of the list // The client must ensure that the list's capacity is not exceeded public boolean append(E it);
// Remove and return the current element public E remove();
// Set the current position to the start of the list public void moveToStart();
// Set the current position to the end of the list public void moveToEnd();
// Move the current position one step left, no change if already at beginning public void prev();
// Move the current position one step right, no change if already at end public void next();
// Return the number of elements in the list public int length();
// Return the position of the current element public int currPos();
// Set the current position to "pos" public boolean moveToPos(int pos);
// Return true if current position is at end of the list public boolean isAtEnd();
// Return the current element public E getValue(); }
isEmpty() method
toString() method
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