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 and it must implement the provided List.java class. Test your implementation thoroughly and include a main method that produces the output described below.

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 { // List class ADT // Remove all contents from the list, so it is once again empty public void clear();

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

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!