Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am also supplied with a test code that actively grades the program as I write it, and my program will need to pass that

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

I am also supplied with a test code that actively grades the program as I write it, and my program will need to pass that test code. I can send that test code over to any expert that can help, thank you very much in advance.

CS 143 Assignment 4 Improving DoublyLinkedList (DLList) DUE on Tuesday, February 19 at 11:59 PM Your assignment is to improve the DoublyLinkedList class we wrote in class. Please start with the version uploaded to Canvas called DLList (abbreviated version shown on the back of this page) to make sure there is a common starting point, but it should be equivalent to what we wrote in class. (This version includes generics and an iterator.) descendinglterator method and Backward Conductor (20 points) Implement a new inner BackwardConductor class that implements Iterator and the method public Iterator implements Iterable{ | private static class Node @param i Zero-based index of element @return element i (throws if invalid i) public Node prev, next; public T data; public Node(Node prev, T data, public T get(int i) ( Node next) ( this . prev prev; this.next next; this.data-data; if (i current head; for (int j-e; current!-null && j *Get and remove element i from the list implements Iterator car; // Next node to visit public Conductor(DLList list) @param i Zero-based index of element @return element i (throws if invalid i) car-list.head; /7 Begin at head public T remove(int i)( if (i (null, data, null); tail-head; else // Put new node after tail tail.next new Node(tail, data,null); tail-tail.next; //New node is now last // The Conductor object can walk this list // forward, front to back. Each time /I .next() is called, the Conductor // produces one more piece of data, // starting with head and ending with tail return new Conductor (this); Page 2 of2

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

More Books

Students also viewed these Databases questions

Question

Ty e2y Evaluate the integral dy

Answered: 1 week ago