SlideShare a Scribd company logo
Using visual studio 2022, a C# windows form application, and your DoubleLinkedClass and
DoubleLinkedNode classes from project 5, implement a DequeueClass, a StackClass, and a
QueueClass. Do not use any arrays, lists, dictionaries, or other built in data structures, only
instances of your linkedLists classes from project 5. The dequeue class needs to contain a
reference to an instance of your DoubleLinkedList class, with the QueueClass and StackClass
inheriting from the Dequeue class. Your Stack and Queue pop and push need to be one-line calls
to the Dequeue popLeft, pushLeft, popRight, pushRight. Do not copy the code from the dequeue
class to implement the Stack and Queue.
DoubleLinkedClasses From2263Project5
internal class DoubleLinkedList<T>
{
public DoubleLinkedListNode<T> firstNode = null;
public DoubleLinkedListNode<T> lastNode = null;
public DoubleLinkedListNode<T> currentNode = null;
public int nodeNumber = 0;
public DoubleLinkedList()
{
}
// creates first node in list with firstValue
public DoubleLinkedList(T firstValue)
{
firstNode = new DoubleLinkedListNode<T>(firstValue);
lastNode = firstNode;
currentNode = firstNode;
nodeNumber = 1;
}
public DoubleLinkedListNode<T> GetCurrentNode()
{
return currentNode;
}
public void InsertFirst(T value)
{
DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value);
if (firstNode == null)
{
firstNode = newNode;
lastNode = firstNode;
currentNode = firstNode;
}
else
{
newNode.next = firstNode;
firstNode.previous = newNode;
firstNode = newNode;
currentNode = firstNode;
}
nodeNumber++;
}
public void InsertBeforeFirst(T value)
{
if (firstNode == null)
{
InsertFirst(value);
return;
}
DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value);
newNode.next = firstNode;
firstNode.previous = newNode;
firstNode = newNode;
nodeNumber++;
}
public void InsertAfterLast(T value)
{
if (lastNode == null)
{
InsertFirst(value);
return;
}
DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value);
lastNode.next = newNode;
newNode.previous = lastNode;
lastNode = newNode;
currentNode = lastNode;
nodeNumber++;
}
public void InsertAfterCurrent(T value)
{
if (currentNode == null)
{
InsertFirst(value);
return;
}
DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value);
newNode.next = currentNode.next;
newNode.previous = currentNode;
if (currentNode.next != null)
{
currentNode.next.previous = newNode;
}
currentNode.next = newNode;
currentNode = newNode;
if (lastNode == currentNode.previous)
{
lastNode = currentNode;
}
nodeNumber++;
}
public int NumberOfNodesInList()
{
return nodeNumber;
}
public void DeleteFirst()
{
if (firstNode == null)
{
return;
}
if (firstNode.next == null)
{
firstNode = null;
lastNode = null;
currentNode = null;
}
else
{
firstNode = firstNode.next;
firstNode.previous = null;
currentNode = firstNode;
}
nodeNumber--;
}
public void DeleteLast()
{
if (lastNode == null)
{
return;
}
if (lastNode.previous == null)
{
firstNode = null;
lastNode = null;
currentNode = null;
}
else
{
lastNode = lastNode.previous;
lastNode.next = null;
currentNode = lastNode;
}
nodeNumber--;
}
public void DeleteCurrent()
{
if (currentNode == null)
{
return;
}
if (currentNode.previous == null)
{
DeleteFirst();
return;
}
if (currentNode.next == null)
{
DeleteLast();
return;
}
currentNode.previous.next = currentNode.next;
currentNode.next.previous = currentNode.previous;
currentNode = currentNode.next;
nodeNumber--;
}
public void MoveToNext()
{
if (currentNode == null || currentNode.next == null)
{
return;
}
currentNode = currentNode.next;
}
public void MoveToPrevious()
{
if (currentNode == null || currentNode.previous == null)
{
return;
}
currentNode = currentNode.previous;
}
public DoubleLinkedListNode<T> Find(T value)
{
return FindRecursive(firstNode, value);
}
private DoubleLinkedListNode<T> FindRecursive(DoubleLinkedListNode<T> node, T value)
{
if (node == null)
{
return null;
}
if (node.value.Equals(value))
{
return node;
}
return FindRecursive(node.next, value);
}
public string GetDisplayString()
{
if (firstNode == null)
{
return "";
}
return GetDisplayStringRecursive(firstNode);
}
private string GetDisplayStringRecursive(DoubleLinkedListNode<T> node)
{
if (node == null)
{
return "";
}
string result = node.value.ToString() + " ";
result += GetDisplayStringRecursive(node.next);
return result;
}
}
internal class DoubleLinkedListNode<T>
{
public T value;
public DoubleLinkedListNode<T> next = null;
public DoubleLinkedListNode<T> previous = null;
public DoubleLinkedListNode(T value)
{
this.value = value;
previous = null;
next = null;
}
private DoubleLinkedListNode()
{
value = default(T);
}
}
Develop a test harness, that allows testing rapid, but effective testing of your classes, including
inserting and deleting 6 or more integers, including completely filling, completely emptying, and
then refilling your data structures
Using visual studio 2022- a C# windows form application- and your Doub.pdf

More Related Content

Similar to Using visual studio 2022- a C# windows form application- and your Doub.pdf

So I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdfSo I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdf
aksahnan
 
.NET 2015: Будущее рядом
.NET 2015: Будущее рядом.NET 2015: Будущее рядом
.NET 2015: Будущее рядом
Andrey Akinshin
 
Need help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docxNeed help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docx
Jason0x0Scottw
 
In the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdfIn the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdf
arjunstores123
 
I need help coding a doubly linked list from this unfinished code- Eve.docx
I need help coding a doubly linked list from this unfinished code- Eve.docxI need help coding a doubly linked list from this unfinished code- Eve.docx
I need help coding a doubly linked list from this unfinished code- Eve.docx
PaulntmMilleri
 
I need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdfI need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdf
sauravmanwanicp
 
Add delete at a position to the code and display it to the code- class.pdf
Add delete at a position to the code and display it to the code- class.pdfAdd delete at a position to the code and display it to the code- class.pdf
Add delete at a position to the code and display it to the code- class.pdf
yrajjoshi
 
Help I keep getting the same error when running a code. Below is the.pdf
Help I keep getting the same error when running a code. Below is the.pdfHelp I keep getting the same error when running a code. Below is the.pdf
Help I keep getting the same error when running a code. Below is the.pdf
mail931892
 
C# Generics
C# GenericsC# Generics
C# Generics
Rohit Vipin Mathews
 
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdfDoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
aathiauto
 
C# code pleaseWrite a program that creates a link list object of 1.pdf
C# code pleaseWrite a program that creates a link list object of 1.pdfC# code pleaseWrite a program that creates a link list object of 1.pdf
C# code pleaseWrite a program that creates a link list object of 1.pdf
duttakajal70
 
For this micro assignment, you must implement two Linked List functi.docx
For this micro assignment, you must implement two Linked List functi.docxFor this micro assignment, you must implement two Linked List functi.docx
For this micro assignment, you must implement two Linked List functi.docx
mckellarhastings
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdf
feroz544
 
import java-util-Iterator- import java-util-NoSuchElementException- im.pdf
import java-util-Iterator- import java-util-NoSuchElementException- im.pdfimport java-util-Iterator- import java-util-NoSuchElementException- im.pdf
import java-util-Iterator- import java-util-NoSuchElementException- im.pdf
Stewart29UReesa
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
asarudheen07
 
Effective C#
Effective C#Effective C#
Effective C#
lantoli
 
Linked Stack program.docx
Linked Stack program.docxLinked Stack program.docx
Linked Stack program.docx
kudikalakalabharathi
 
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you!   Create a class BinaryTr.pdfPlease help write BinaryTree-java Thank you!   Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
info750646
 

Similar to Using visual studio 2022- a C# windows form application- and your Doub.pdf (20)

So I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdfSo I have this code(StackInAllSocks) and I implemented the method but.pdf
So I have this code(StackInAllSocks) and I implemented the method but.pdf
 
.NET 2015: Будущее рядом
.NET 2015: Будущее рядом.NET 2015: Будущее рядом
.NET 2015: Будущее рядом
 
Need help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docxNeed help finishing this doubly linked list code- Commented lines are.docx
Need help finishing this doubly linked list code- Commented lines are.docx
 
In the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdfIn the class we extensively discussed a node class called IntNode in.pdf
In the class we extensively discussed a node class called IntNode in.pdf
 
I need help coding a doubly linked list from this unfinished code- Eve.docx
I need help coding a doubly linked list from this unfinished code- Eve.docxI need help coding a doubly linked list from this unfinished code- Eve.docx
I need help coding a doubly linked list from this unfinished code- Eve.docx
 
I need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdfI need help implementing a Stack with this java programming assignme.pdf
I need help implementing a Stack with this java programming assignme.pdf
 
Add delete at a position to the code and display it to the code- class.pdf
Add delete at a position to the code and display it to the code- class.pdfAdd delete at a position to the code and display it to the code- class.pdf
Add delete at a position to the code and display it to the code- class.pdf
 
Help I keep getting the same error when running a code. Below is the.pdf
Help I keep getting the same error when running a code. Below is the.pdfHelp I keep getting the same error when running a code. Below is the.pdf
Help I keep getting the same error when running a code. Below is the.pdf
 
C# Generics
C# GenericsC# Generics
C# Generics
 
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdfDoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
DoublyList-cpp- #include -DoublyList-h- using namespace std- void Doub.pdf
 
C# code pleaseWrite a program that creates a link list object of 1.pdf
C# code pleaseWrite a program that creates a link list object of 1.pdfC# code pleaseWrite a program that creates a link list object of 1.pdf
C# code pleaseWrite a program that creates a link list object of 1.pdf
 
CSharp v1.0.2
CSharp v1.0.2CSharp v1.0.2
CSharp v1.0.2
 
Lab-2.4 101.pdf
Lab-2.4 101.pdfLab-2.4 101.pdf
Lab-2.4 101.pdf
 
For this micro assignment, you must implement two Linked List functi.docx
For this micro assignment, you must implement two Linked List functi.docxFor this micro assignment, you must implement two Linked List functi.docx
For this micro assignment, you must implement two Linked List functi.docx
 
could you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdfcould you implement this function please, im having issues with it..pdf
could you implement this function please, im having issues with it..pdf
 
import java-util-Iterator- import java-util-NoSuchElementException- im.pdf
import java-util-Iterator- import java-util-NoSuchElementException- im.pdfimport java-util-Iterator- import java-util-NoSuchElementException- im.pdf
import java-util-Iterator- import java-util-NoSuchElementException- im.pdf
 
import java-util--- public class MyLinkedList{ public static void.pdf
import java-util---  public class MyLinkedList{    public static void.pdfimport java-util---  public class MyLinkedList{    public static void.pdf
import java-util--- public class MyLinkedList{ public static void.pdf
 
Effective C#
Effective C#Effective C#
Effective C#
 
Linked Stack program.docx
Linked Stack program.docxLinked Stack program.docx
Linked Stack program.docx
 
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you!   Create a class BinaryTr.pdfPlease help write BinaryTree-java Thank you!   Create a class BinaryTr.pdf
Please help write BinaryTree-java Thank you! Create a class BinaryTr.pdf
 

More from acteleshoppe

Using your understanding of Hardy-Weinberg proportions- which of the f.pdf
Using your understanding of Hardy-Weinberg proportions- which of the f.pdfUsing your understanding of Hardy-Weinberg proportions- which of the f.pdf
Using your understanding of Hardy-Weinberg proportions- which of the f.pdf
acteleshoppe
 
Using the summary table above- match the sources of variation with the.pdf
Using the summary table above- match the sources of variation with the.pdfUsing the summary table above- match the sources of variation with the.pdf
Using the summary table above- match the sources of variation with the.pdf
acteleshoppe
 
Using PowerPoint draft an academic poster critically analysing and ill.pdf
Using PowerPoint draft an academic poster critically analysing and ill.pdfUsing PowerPoint draft an academic poster critically analysing and ill.pdf
Using PowerPoint draft an academic poster critically analysing and ill.pdf
acteleshoppe
 
Using the life cycle image above to help you define meiosis- haplece a.pdf
Using the life cycle image above to help you define meiosis- haplece a.pdfUsing the life cycle image above to help you define meiosis- haplece a.pdf
Using the life cycle image above to help you define meiosis- haplece a.pdf
acteleshoppe
 
Using the Influence tactic known as pressure usually Involves Multiple.pdf
Using the Influence tactic known as pressure usually Involves Multiple.pdfUsing the Influence tactic known as pressure usually Involves Multiple.pdf
Using the Influence tactic known as pressure usually Involves Multiple.pdf
acteleshoppe
 
Using the information below- please prepare the 2020 and 2021 Balance.pdf
Using the information below- please prepare the 2020 and 2021 Balance.pdfUsing the information below- please prepare the 2020 and 2021 Balance.pdf
Using the information below- please prepare the 2020 and 2021 Balance.pdf
acteleshoppe
 
Using the following national income accounting data- compute (a) GDP-.pdf
Using the following national income accounting data- compute (a) GDP-.pdfUsing the following national income accounting data- compute (a) GDP-.pdf
Using the following national income accounting data- compute (a) GDP-.pdf
acteleshoppe
 
Using the company Netflix- Based on your prior research- determine.pdf
Using the company Netflix-    Based on your prior research- determine.pdfUsing the company Netflix-    Based on your prior research- determine.pdf
Using the company Netflix- Based on your prior research- determine.pdf
acteleshoppe
 
Using the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdfUsing the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdf
acteleshoppe
 
Using the code below- I need help with the following 3 things- 1) Writ.pdf
Using the code below- I need help with the following 3 things- 1) Writ.pdfUsing the code below- I need help with the following 3 things- 1) Writ.pdf
Using the code below- I need help with the following 3 things- 1) Writ.pdf
acteleshoppe
 
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdfUsing the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
acteleshoppe
 
Using the areas in Figure (the Empirical Rule)- find the areas between.pdf
Using the areas in Figure (the Empirical Rule)- find the areas between.pdfUsing the areas in Figure (the Empirical Rule)- find the areas between.pdf
Using the areas in Figure (the Empirical Rule)- find the areas between.pdf
acteleshoppe
 
Using sources from the Internet- identify some of the problems facing.pdf
Using sources from the Internet- identify some of the problems facing.pdfUsing sources from the Internet- identify some of the problems facing.pdf
Using sources from the Internet- identify some of the problems facing.pdf
acteleshoppe
 
Using Python- Prompt the user to enter a word and a single character-.pdf
Using Python- Prompt the user to enter a word and a single character-.pdfUsing Python- Prompt the user to enter a word and a single character-.pdf
Using Python- Prompt the user to enter a word and a single character-.pdf
acteleshoppe
 
Using putty with Bash shell- I am trying to complete the following-.pdf
Using putty with Bash shell-  I am trying to complete the following-.pdfUsing putty with Bash shell-  I am trying to complete the following-.pdf
Using putty with Bash shell- I am trying to complete the following-.pdf
acteleshoppe
 
Using linux - For each environment variable below- state whether it is.pdf
Using linux - For each environment variable below- state whether it is.pdfUsing linux - For each environment variable below- state whether it is.pdf
Using linux - For each environment variable below- state whether it is.pdf
acteleshoppe
 
Using Java and the parboiled Java library Write a BNF grammar for the.pdf
Using Java and the parboiled Java library Write a BNF grammar for the.pdfUsing Java and the parboiled Java library Write a BNF grammar for the.pdf
Using Java and the parboiled Java library Write a BNF grammar for the.pdf
acteleshoppe
 
using basic python P4-16 Factoring of integers- Write a program that a.pdf
using basic python P4-16 Factoring of integers- Write a program that a.pdfusing basic python P4-16 Factoring of integers- Write a program that a.pdf
using basic python P4-16 Factoring of integers- Write a program that a.pdf
acteleshoppe
 
using C# language- a WPF application will be made with the application.pdf
using C# language- a WPF application will be made with the application.pdfusing C# language- a WPF application will be made with the application.pdf
using C# language- a WPF application will be made with the application.pdf
acteleshoppe
 
Using a waterfall framework is suitable for a project involving which.pdf
Using a waterfall framework is suitable for a project involving which.pdfUsing a waterfall framework is suitable for a project involving which.pdf
Using a waterfall framework is suitable for a project involving which.pdf
acteleshoppe
 

More from acteleshoppe (20)

Using your understanding of Hardy-Weinberg proportions- which of the f.pdf
Using your understanding of Hardy-Weinberg proportions- which of the f.pdfUsing your understanding of Hardy-Weinberg proportions- which of the f.pdf
Using your understanding of Hardy-Weinberg proportions- which of the f.pdf
 
Using the summary table above- match the sources of variation with the.pdf
Using the summary table above- match the sources of variation with the.pdfUsing the summary table above- match the sources of variation with the.pdf
Using the summary table above- match the sources of variation with the.pdf
 
Using PowerPoint draft an academic poster critically analysing and ill.pdf
Using PowerPoint draft an academic poster critically analysing and ill.pdfUsing PowerPoint draft an academic poster critically analysing and ill.pdf
Using PowerPoint draft an academic poster critically analysing and ill.pdf
 
Using the life cycle image above to help you define meiosis- haplece a.pdf
Using the life cycle image above to help you define meiosis- haplece a.pdfUsing the life cycle image above to help you define meiosis- haplece a.pdf
Using the life cycle image above to help you define meiosis- haplece a.pdf
 
Using the Influence tactic known as pressure usually Involves Multiple.pdf
Using the Influence tactic known as pressure usually Involves Multiple.pdfUsing the Influence tactic known as pressure usually Involves Multiple.pdf
Using the Influence tactic known as pressure usually Involves Multiple.pdf
 
Using the information below- please prepare the 2020 and 2021 Balance.pdf
Using the information below- please prepare the 2020 and 2021 Balance.pdfUsing the information below- please prepare the 2020 and 2021 Balance.pdf
Using the information below- please prepare the 2020 and 2021 Balance.pdf
 
Using the following national income accounting data- compute (a) GDP-.pdf
Using the following national income accounting data- compute (a) GDP-.pdfUsing the following national income accounting data- compute (a) GDP-.pdf
Using the following national income accounting data- compute (a) GDP-.pdf
 
Using the company Netflix- Based on your prior research- determine.pdf
Using the company Netflix-    Based on your prior research- determine.pdfUsing the company Netflix-    Based on your prior research- determine.pdf
Using the company Netflix- Based on your prior research- determine.pdf
 
Using the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdfUsing the code below- I need help with creating code for the following.pdf
Using the code below- I need help with creating code for the following.pdf
 
Using the code below- I need help with the following 3 things- 1) Writ.pdf
Using the code below- I need help with the following 3 things- 1) Writ.pdfUsing the code below- I need help with the following 3 things- 1) Writ.pdf
Using the code below- I need help with the following 3 things- 1) Writ.pdf
 
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdfUsing the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
Using the assigned class reading- -SOCIAL CONTROL THEORIES OF URBAN PO.pdf
 
Using the areas in Figure (the Empirical Rule)- find the areas between.pdf
Using the areas in Figure (the Empirical Rule)- find the areas between.pdfUsing the areas in Figure (the Empirical Rule)- find the areas between.pdf
Using the areas in Figure (the Empirical Rule)- find the areas between.pdf
 
Using sources from the Internet- identify some of the problems facing.pdf
Using sources from the Internet- identify some of the problems facing.pdfUsing sources from the Internet- identify some of the problems facing.pdf
Using sources from the Internet- identify some of the problems facing.pdf
 
Using Python- Prompt the user to enter a word and a single character-.pdf
Using Python- Prompt the user to enter a word and a single character-.pdfUsing Python- Prompt the user to enter a word and a single character-.pdf
Using Python- Prompt the user to enter a word and a single character-.pdf
 
Using putty with Bash shell- I am trying to complete the following-.pdf
Using putty with Bash shell-  I am trying to complete the following-.pdfUsing putty with Bash shell-  I am trying to complete the following-.pdf
Using putty with Bash shell- I am trying to complete the following-.pdf
 
Using linux - For each environment variable below- state whether it is.pdf
Using linux - For each environment variable below- state whether it is.pdfUsing linux - For each environment variable below- state whether it is.pdf
Using linux - For each environment variable below- state whether it is.pdf
 
Using Java and the parboiled Java library Write a BNF grammar for the.pdf
Using Java and the parboiled Java library Write a BNF grammar for the.pdfUsing Java and the parboiled Java library Write a BNF grammar for the.pdf
Using Java and the parboiled Java library Write a BNF grammar for the.pdf
 
using basic python P4-16 Factoring of integers- Write a program that a.pdf
using basic python P4-16 Factoring of integers- Write a program that a.pdfusing basic python P4-16 Factoring of integers- Write a program that a.pdf
using basic python P4-16 Factoring of integers- Write a program that a.pdf
 
using C# language- a WPF application will be made with the application.pdf
using C# language- a WPF application will be made with the application.pdfusing C# language- a WPF application will be made with the application.pdf
using C# language- a WPF application will be made with the application.pdf
 
Using a waterfall framework is suitable for a project involving which.pdf
Using a waterfall framework is suitable for a project involving which.pdfUsing a waterfall framework is suitable for a project involving which.pdf
Using a waterfall framework is suitable for a project involving which.pdf
 

Recently uploaded

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 

Recently uploaded (20)

special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 

Using visual studio 2022- a C# windows form application- and your Doub.pdf

  • 1. Using visual studio 2022, a C# windows form application, and your DoubleLinkedClass and DoubleLinkedNode classes from project 5, implement a DequeueClass, a StackClass, and a QueueClass. Do not use any arrays, lists, dictionaries, or other built in data structures, only instances of your linkedLists classes from project 5. The dequeue class needs to contain a reference to an instance of your DoubleLinkedList class, with the QueueClass and StackClass inheriting from the Dequeue class. Your Stack and Queue pop and push need to be one-line calls to the Dequeue popLeft, pushLeft, popRight, pushRight. Do not copy the code from the dequeue class to implement the Stack and Queue. DoubleLinkedClasses From2263Project5 internal class DoubleLinkedList<T> { public DoubleLinkedListNode<T> firstNode = null; public DoubleLinkedListNode<T> lastNode = null; public DoubleLinkedListNode<T> currentNode = null; public int nodeNumber = 0; public DoubleLinkedList() { } // creates first node in list with firstValue public DoubleLinkedList(T firstValue) { firstNode = new DoubleLinkedListNode<T>(firstValue); lastNode = firstNode; currentNode = firstNode; nodeNumber = 1; } public DoubleLinkedListNode<T> GetCurrentNode() { return currentNode; } public void InsertFirst(T value) { DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value); if (firstNode == null) { firstNode = newNode; lastNode = firstNode;
  • 2. currentNode = firstNode; } else { newNode.next = firstNode; firstNode.previous = newNode; firstNode = newNode; currentNode = firstNode; } nodeNumber++; } public void InsertBeforeFirst(T value) { if (firstNode == null) { InsertFirst(value); return; } DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value); newNode.next = firstNode; firstNode.previous = newNode; firstNode = newNode; nodeNumber++; } public void InsertAfterLast(T value) { if (lastNode == null) { InsertFirst(value); return; } DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value); lastNode.next = newNode; newNode.previous = lastNode; lastNode = newNode; currentNode = lastNode; nodeNumber++; } public void InsertAfterCurrent(T value)
  • 3. { if (currentNode == null) { InsertFirst(value); return; } DoubleLinkedListNode<T> newNode = new DoubleLinkedListNode<T>(value); newNode.next = currentNode.next; newNode.previous = currentNode; if (currentNode.next != null) { currentNode.next.previous = newNode; } currentNode.next = newNode; currentNode = newNode; if (lastNode == currentNode.previous) { lastNode = currentNode; } nodeNumber++; } public int NumberOfNodesInList() { return nodeNumber; } public void DeleteFirst() { if (firstNode == null) { return; } if (firstNode.next == null) { firstNode = null; lastNode = null; currentNode = null; } else { firstNode = firstNode.next; firstNode.previous = null; currentNode = firstNode; }
  • 4. nodeNumber--; } public void DeleteLast() { if (lastNode == null) { return; } if (lastNode.previous == null) { firstNode = null; lastNode = null; currentNode = null; } else { lastNode = lastNode.previous; lastNode.next = null; currentNode = lastNode; } nodeNumber--; } public void DeleteCurrent() { if (currentNode == null) { return; } if (currentNode.previous == null) { DeleteFirst(); return; } if (currentNode.next == null) { DeleteLast(); return; } currentNode.previous.next = currentNode.next; currentNode.next.previous = currentNode.previous; currentNode = currentNode.next;
  • 5. nodeNumber--; } public void MoveToNext() { if (currentNode == null || currentNode.next == null) { return; } currentNode = currentNode.next; } public void MoveToPrevious() { if (currentNode == null || currentNode.previous == null) { return; } currentNode = currentNode.previous; } public DoubleLinkedListNode<T> Find(T value) { return FindRecursive(firstNode, value); } private DoubleLinkedListNode<T> FindRecursive(DoubleLinkedListNode<T> node, T value) { if (node == null) { return null; } if (node.value.Equals(value)) { return node; } return FindRecursive(node.next, value); } public string GetDisplayString() { if (firstNode == null)
  • 6. { return ""; } return GetDisplayStringRecursive(firstNode); } private string GetDisplayStringRecursive(DoubleLinkedListNode<T> node) { if (node == null) { return ""; } string result = node.value.ToString() + " "; result += GetDisplayStringRecursive(node.next); return result; } } internal class DoubleLinkedListNode<T> { public T value; public DoubleLinkedListNode<T> next = null; public DoubleLinkedListNode<T> previous = null; public DoubleLinkedListNode(T value) { this.value = value; previous = null; next = null; } private DoubleLinkedListNode() { value = default(T); } } Develop a test harness, that allows testing rapid, but effective testing of your classes, including inserting and deleting 6 or more integers, including completely filling, completely emptying, and then refilling your data structures