struct Node{T Data;Node *nextPtr;};class LinkedList{private:int Length;Node *headPtr;public:Linked List();-LinkedList();int getlength();void insertNode(T);void removeNode(T);void...


Apply concepts of Advanced Data Structures to implement a template class for singly<br>linked list with following attributes and functionalities:<br>template <class T><br>struct Node{<br>T Data;<br>Node <T> *nextPtr;<br>};<br>class LinkedList{<br>private:<br>int Length;<br>Node <T> *headPtr;<br>public:<br>Linked List();<br>-LinkedList();<br>int getlength();<br>void insertNode(T);<br>void removeNode(T);<br>void Movetolast(int index);<br>void DisplayList();<br>);<br>- insertNode(T) will insert a new node at the start of the list<br>- Function removeNode( T) will search a node and if found, delete it from the list.- Copy Constructor: Copy<br>Constructor will make a copy of an existing Linked List<br>- Movetolast (int index) will move a node from an index to the end of the list.<br>- In main(), create a linked lists of type float and ask the user to add 10 values to<br>the list. Move the first two elements in the list to last and display the linked list.<br>

Extracted text: Apply concepts of Advanced Data Structures to implement a template class for singly linked list with following attributes and functionalities: template struct Node{ T Data; Node *nextPtr; }; class LinkedList{ private: int Length; Node *headPtr; public: Linked List(); -LinkedList(); int getlength(); void insertNode(T); void removeNode(T); void Movetolast(int index); void DisplayList(); ); - insertNode(T) will insert a new node at the start of the list - Function removeNode( T) will search a node and if found, delete it from the list.- Copy Constructor: Copy Constructor will make a copy of an existing Linked List - Movetolast (int index) will move a node from an index to the end of the list. - In main(), create a linked lists of type float and ask the user to add 10 values to the list. Move the first two elements in the list to last and display the linked list.
Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here