I need to write out the class with these methods | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I need to write out the class with these methods

The DList class should also have the following methods (minimally): A prDList() method that display the sorted doubly-linked list from first to last, neatly formatted with at most 10 objects per line of output; A setFirst() method that sets the DList first variable, a setLast() method that sets the DList last variable, and a setMid() method that sets the DList mid variable. These are trivial methods. A newFirst(BNode<T> node) method that adds the passed node at the beginning of the list, increments the count, and calls setNewMid() below; A newLast(BNode<T> node) method that adds the passed node at the end of the list, increments the count, and calls setNewMid() below; A newInside(BNode<T> node) method that inserts the passed node somewhere inside the list using the mid field (pseudocode below), increments the count, and calls setNewMid() below; A setNewMid() method that modifies the DList mid field (pseudocode below); this MUST be called every time a new node is added to the list BEFORE adding the next node;

12th Oct 2020, 4:42 AM
Basel Kaskas
1 Answer
0
Its easy... and the question is?
31st Dec 2020, 12:27 AM
David Ordás
David Ordás - avatar