Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

5. How do instructional objectives help learning to occur?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago