Question: This assignment must use Circular Doubly-Linked List with Head Node Specifications: Develop a Circular Doubly-Linked List with head node class based on the following ADT.

 This assignment must use Circular Doubly-Linked List with Head Node Specifications:Develop a Circular Doubly-Linked List with head node class based on the

This assignment must use Circular Doubly-Linked List with Head Node Specifications: Develop a Circular Doubly-Linked List with head node class based on the following ADT. Name: CDLH List Data Members Node * head node; /a pointer pointing to the first node, e.g., the head node int list size:; //The size of the list Member Functions constructor bool empty) //check whether the list is empty void insert succ(Node *new, Node sucs) //insert a new node before the successor void erase node(Node *node) //delete the node from the list int erase by data(int d) // delete all the node(s) that has the data specified, return the number of nodes that have been deleted display the size of the list access the last item from the head node void display) // display all items on the list, from the first node to the last; moreover, void reverse display0 //display all items from the last to the first, also display the size double calc mean // calculate and return the mean of all nodes' data on the list The data stored in a Node object is a score between 60 and 100, generated randomly. DO NOT use the time function, so that the random numbers generated are always follow the same sequence The driver must conduct the following tasks in the order specified below: 1. Instantiate 20 Node's objects, where the scores are generated randomly (must use a loop) 2. Instantiate a CDLH List object, named exlist. 3. Insert all 20 nodes 4. Display all nodes and the size of the list 5. Display reversely of all nodes and the size of the list 6. Calculate and display the mean. 7. Delete the first node 8. Display all nodes and the size of the list 9. Display reversely of all nodes and the size of the list 10. Calculate and display the mean. 11. Erase all the nodes that have the same value as the data specified (pick a number that exists) 12. Display the all nodes and the size of the list 13. Display reversely of all nodes and the size of the list 14. Calculate and display the mean

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!