Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help finishing this doubly linked list code. Commented lines are what's needed, also add the following recursive methods: findFirstNodeWithValue() and getDisplayString() that returns a

Need help finishing this doubly linked list code.

Commented lines are what's needed, also add the following recursive methods: findFirstNodeWithValue() and getDisplayString() that returns a string containing the strings in the list separated by spaces

Code in C# language only, please.

internal class DoubleLinkedList { public DoubleLinkedListNode? firstNode = null; public DoubleLinkedListNode? lastNode = null; public DoubleLinkedListNode? currentNode = null; // other class level variables needed?

public DoubleLinkedList() { // creates first node in list with firstValue }

public DoubleLinkedList(string firstValue) { // methods and features to add: // get current node reference // insert node before first // delete first node // insert node after last // delete last node // insert node after current - uses multiple methods // delete current // move current to next node // move current to previous node // recursive: find node with value - return reference or null // recursive: get display string } }

/******************************* * double Linked List Node - needs to be made generic * class is incomplete * *****************************/ internal class DoubleLinkedListNode { public string? value = null; public DoubleLinkedListNode? nextNode = null; public DoubleLinkedListNode? previousNode = null; public DoubleLinkedListNode(string v) { value = v.ToLower(); }

private DoubleLinkedListNode() { value = null; } }

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_2

Step: 3

blur-text-image_3

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

5. What decision-making model would you advocate to this person?

Answered: 1 week ago

Question

6. What data will she need?

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago