Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help coding a doubly linked list from this unfinished code. Everything commented out is what needs to be added. This is done using

I need help coding a doubly linked list from this unfinished code.

Everything commented out is what needs to be added. This is done using C# in a Visual Studio Windows Form App.

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

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions