create linked list function

Please create linked list function

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

the instruction is given in the pdf that i have uploaded

CS210 FALL 2023
Programming Assignment 1
Points Possible: 100
The programming assignment is built on implementing the LIST ADT using a Doubly Linked List.
Use the DLLTemplate provided along with this project as a starting point.
Add & implement the following methods, according to the given definitions, to the DoubleLinkedList
Class:
1. Add all Delete Methods:
a. void deleteAtHead(): prints then deletes the head of the list.
b. void deleteAtTail(): prints then deletes the tail of the list.
c. void deleteAtIndex(int index): prints then deletes the node at given index.
2. void sortList(): Sort all nodes in the list in ascending order of int value. Print the List.
3. void removeMultiples(): This removes all nodes that have matching data. This method must
delete these nodes and free up memory. Print the updated list.
4. int countMultiples(T value): This method counts how many nodes have the value matching to T
value passed in the argument.
This method might require modifications being made to the Data class, to write a custom compareData()
method, which is also an acceptable solution.
5. void headTailSplit(): This method splits the given linked list into two separate linked lists A and B.
List A will have all the nodes starting from head to middle of the list.
List B will have all the nodes starting from tail to the middle of the list. Connected in reverse
order.
As the nodes are being moved from the original list to the split lists, they need to be deleted
from the original list and the original list needs to be deleted after the split lists are created.
Print both lists.
6. void reverseList(): Reverse the double Linked List. Print reversed list.
All function names that you write must match exactly as in the document datatype & name.
Arguments may be added but given arguments cannot be removed.
You may add helper functions as required.
The Main Program should execute as follows:
1. Display a Menu for the user that loops infinitely till the exit, Split List or Delete List Option is
Chosen. User chooses a menu option. The “how” is your choice.
2. Menu is as follows; each option calls the corresponding function of the list.
Create a List
Delete a List
Insert at Head
Insert at Tail
Insert at Index
Delete at Head
Delete at Tail
Delete at Index
Reverse List
Sort List
Count Multiples
Delete Multiples
Split List Even Odd
Exit
3. “Create a List” in the Menu is optional. If you would like to prepopulate the data and have the
list created before the user is presented with the menu, you may do so.
Do not change the order or add other options to the menu. User must be able to perform all these
functions and the main method must call the appropriate Linked List functions.
TO SUBMIT:
FirstName_LastName.zip containing:
-> DoubleLinkedList.cpp (contains all class Data, Node, DoubleLinkedList and the main program)
->ReadMe.pdf
Read Me:
Following sections must be included in the Readme.
1.
2.
3.
4.
5.
Name of the Project
List Authors of the Project
File Structure of the project submitted
Software that can be used to run the files / Installation Guide
How to get started?
a. Describe the input required from the user
b. Describe what function is called by each input and briefly describe each function.
6. Runtime: Derive the Big 0 of each function mathematically or by recognizing the section of code
that takes the maximum time to execute.
#include
using namespace std;
// Data Class : Holds all the data that goes inside the Node
class Data {
public:
int value;
string name;
Data(int value, string name) {
this->value = value;
this->name = name;
}
void print() {
cout next = newNode;
next1->prev = newNode;
length++;
return true;
}
// All delete Methods
// Write DeleteHead, DeleteTail & DeleteAtIndex here
};
// Main Program
int main() {
// creating data object
Data *d1 = new Data(10, “a”);
// Creating Linked List
DoubleLinkedList *ll1 = new DoubleLinkedList(d1);
// Calling operations on Linked List
ll1->printList();
return 0;
}

Still stressed with your coursework?
Get quality coursework help from an expert!