Question: CSC421 Assignment 2 (50 Points) Complete the following program named myLinkedlist.cpp to create a linked character list and a linked integer list and then display

 CSC421 Assignment 2 (50 Points) Complete the following program named myLinkedlist.cpp

to create a linked character list and a linked integer list and

CSC421 Assignment 2 (50 Points) Complete the following program named myLinkedlist.cpp to create a linked character list and a linked integer list and then display both lists. Compile your program and run your program using the command lines: c# -o myLinkedlist myLinkedlist.cpp Center /myLinkedlist nc ni center> Where ne and ni are the number of entries in the character list and the integer list, respectively. // Student Name // Student ID // myLinkedlist.cpp #include #include #include #include using namespace std; template class myNode T data; myNode *next; public: myNode(Tv)(data=v; next=NULL;} myNode(Tv, myNode *n){data=v; next=n;} template friend class myList; // node class // data // pointer to next node // constructor // constructor // list class // head pointer template class myList{ myNode *head; public: myListO{head NULL;} myList(); bool emptyO{return !head;) int length(); void add(Tv); void append(Tv); void display(int m); // constructor // destructor // empty or not // length of list // add to head // append to tail // display, m elements per line // complete my List class here int main(int arge, char argvin int ncato(argv[1]): int ni atolargv[2]): myList char clist: my Listint list: const int m-8: srand(unsigned) time(NULL)): // program entrance // number of characters to add / number of integers to append // character list // integer list W m items displayed per line // set random seed create character list and display all entries int 1-0 whilerine chare=rand%26+65: clist.add(e); cout

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!