Question: Hi this is data structure class. Can you explain and give me the answer? C++ 22) The class below defines a insert function shoul should
22) The class below defines a insert function shoul should assign data. 12 points node for a linked list. Write a FUNCTION called INSERT that s a node at the end. Assume that one node named HEAD has already been created. Your ld take any node names as arguments that the user enters in the function call and PLEASE PUT ANSWER HERE class Node string name; int data; Node *next; public: Node() { next = NULL; } void setname(string n) {name = n;} void setdata(int d) (data d;) void setnext(Node *p)f next p;) string getname() (return name;) int getdata() freturn data;) Node getnext) (return *next:)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
