Read this: Complete the code in Visual Studio using C++ Programming Language with 1 file or clear answer!! - Give me the answer in Visual Studio so I can copy*** - Separate the files such as .cpp, .h, or .main if any! Develop a C++ "doubly" linked list class of your own that can hold a series of signed shorts Develop the following functionality: Develop a linked list node struct/class You can use it as a subclass like in the book (Class contained inside a class) You can use it as its own separate class Your choice Maintain a private pointer to a node class pointer (head) Constructor Initialize head pointer to null Destructor Make sure to properly delete every node in your linked list push_front(value) Insert the value at the front of the linked list pop_front() Remove the node at the front of the linked list If empty, this is a no operation operator << Display the contents of the linked list just like you would print a character string operator [] Treat like an array Return the value stored in that element of the linked list If element doesn’t exist, return std::numeric_limits::min() empty() Returns a boolean that determines if the linked list is empty or not size() Returns how many elements are currently in the linked list You may not use a variable to maintain the size You must calculate it manually using pointers insert(positionIndex, value) Think vector indexing positionIndex of 0 means insert at the beginning of the linked list positionIndex >= linked list size gets inserted at the back of the linked list erase(positionIndex) Think vector indexing positionIndex of 0 means insert at the beginning of the linked list positionIndex >= linked list size is a no operation find(value) Searches the linked list for the given value Think vector indexing If found, returns the index value it is at If not found, returns -1 Extensively test your linked list class to make sure all above functionality works in all possible cases
Types of Linked List
A sequence of data elements connected through links is called a linked list (LL). The elements of a linked list are nodes containing data and a reference to the next node in the list. In a linked list, the elements are stored in a non-contiguous manner and the linear order in maintained by means of a pointer associated with each node in the list which is used to point to the subsequent node in the list.
Linked List
When a set of items is organized sequentially, it is termed as list. Linked list is a list whose order is given by links from one item to the next. It contains a link to the structure containing the next item so we can say that it is a completely different way to represent a list. In linked list, each structure of the list is known as node and it consists of two fields (one for containing the item and other one is for containing the next item address).
Read this: Complete the code in Visual Studio using C++ Programming Language with 1 file or clear answer!!
- Give me the answer in Visual Studio so I can copy***
- Separate the files such as .cpp, .h, or .main if any!
Develop a C++ "doubly" linked list class of your own that can hold a series of signed shorts
Develop the following functionality:
- Develop a linked list node struct/class
- You can use it as a subclass like in the book (Class contained inside a class)
- You can use it as its own separate class
- Your choice
- Maintain a private pointer to a node class pointer (head)
- Constructor
- Initialize head pointer to null
- Destructor
- Make sure to properly delete every node in your linked list
- push_front(value)
- Insert the value at the front of the linked list
- pop_front()
- Remove the node at the front of the linked list
- If empty, this is a no operation
- operator <<
- Display the contents of the linked list just like you would print a character string
- operator []
- Treat like an array
- Return the value stored in that element of the linked list
- If element doesn’t exist, return std::numeric_limits<short>::min()
- empty()
- Returns a boolean that determines if the linked list is empty or not
- size()
- Returns how many elements are currently in the linked list
- You may not use a variable to maintain the size
- You must calculate it manually using pointers
- insert(positionIndex, value)
- Think
vector indexing - positionIndex of 0 means insert at the beginning of the linked list
- positionIndex >= linked list size gets inserted at the back of the linked list
- erase(positionIndex)
- Think vector indexing
- positionIndex of 0 means insert at the beginning of the linked list
- positionIndex >= linked list size is a no operation
- find(value)
- Searches the linked list for the given value
- Think vector indexing
- If found, returns the index value it is at
- If not found, returns -1
Extensively test your linked list class to make sure all above functionality works in all possible cases
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 9 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)