Question: Define and implement the LinkedList class template in the file LinkedList.cpp . Please read the comments carefully and implement the class template. The main function

Define and implement the LinkedList class template in the file LinkedList.cpp. Please read the comments carefully and implement the
class template.
The main function is contained in the file lab05.cpp. The main function contains the following 3 parts.
A. Part 1:
Declares a linked list which stores integers.
Prompts user to enter int values and push these values in the linked list, stop adding the values when the user enter 0.
Prints the size of the linked list.
Prints the values in the linked list.
Prompts user to enter a value key, and find if key is in the linked list.
Prompts user to enter k(the number of values to be removed), and remove k values from the front.
Prints the values stored in the linked list.
B. Part 2:
Declares a linked list which stores strings.
Prompts user to enter strings and add these strings in the linked list, stop adding the strings when the user enters "exit".
Prints the size of the linked list.
Prints the strings in the linked list.
Prompts user to enter k(the number of strings to be removed), and remove k strings from the front.
Prints the strings stored in the linked list.
C. Part 3:
Declares a linked list which stores employees (click download Employee.cpp darr ).
Prompts user to enter employee's id, name, and department name, and add the employees in the linked list, stop adding when the user enters id as 0.
Prints the size of the linked list.
Prints the employees in the linked list.
Prompts user to enter k(the number of employees to be removed), and remove k employees from the front.
Prints the employees stored in the linked list.
The expected result:
 Define and implement the LinkedList class template in the file LinkedList.cpp.

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!