Question: Help writing an NodeList class using linked lists in c++? I am supposed to make an NodeList class which is an array made up of

Help writing an NodeList class using linked lists in c++?

I am supposed to make an NodeList class which is an array made up of class DataTypes. We were given the DataType.cpp, DataType.h, and NodeList.h files. (Files given here - https://docs.google.com/document/d/1F4AZfHKEqNbfDYhSGaMmQNWfZFV_Wz92ir9mnlUuu3U/edit?usp=sharing). Now I need to make NodeList.cpp.

A description of all the functions are given down below.

Help writing an NodeList class using linked lists in c++? I amsupposed to make an NodeList class which is an array made upof class DataTypes. We were given the DataType.cpp, DataType.h, and NodeList.h files.

The NodeList Class will contain the following private data members: m_head, a Node class type Pointer, pointing to the Dynamically Allocated Node object considered as the first element of the list. Note. If the list is empty m_head should be NULL and will have the following public member functions: (1) Default Constructor will instantiate a new list object with no data (no Nodes). Note. What needs to be initialized in this case? (2) Parametrized Constructor - will instantiate a new list object, which will hold size_t count number of elements (Nodes) in total, all of them initialized to hold the same value as the DataType value parameter. Note: Has to properly handle allocation. (3) Copy Constructor _ will instantiate a new list object which will be a separate copy of the data of the other NodeList object which is getting copied. Note. Remember Deep and The NodeList Class will contain the following private data members: m_head, a Node class type Pointer, pointing to the Dynamically Allocated Node object considered as the first element of the list. Note. If the list is empty m_head should be NULL and will have the following public member functions: (1) Default Constructor will instantiate a new list object with no data (no Nodes). Note. What needs to be initialized in this case? (2) Parametrized Constructor - will instantiate a new list object, which will hold size_t count number of elements (Nodes) in total, all of them initialized to hold the same value as the DataType value parameter. Note: Has to properly handle allocation. (3) Copy Constructor _ will instantiate a new list object which will be a separate copy of the data of the other NodeList object which is getting copied. Note. Remember Deep and

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!