Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++program that includes the following: Define the LinkedList class template in the header file LinkedList.h LinkedList.h #ifndef LL H define LLH #include 108

image text in transcribed
image text in transcribed
Write a C++program that includes the following: Define the LinkedList class template in the header file LinkedList.h LinkedList.h #ifndef LL H define LLH #include 108 trean> using nanespace std tenplate using namespace std template #include "LinkedList "h" #includeLinkedList.cpp. // add if the interface and inplementation)are 8eperate int main) The main function, . Declare a linked list which stores integers. 2. Prompty the user to enter int values and add these values in the int linked list, stop adding the values when the user enter O 3. Prompty the user to enter k (the number of values to be removed), and remove k values from the front Print the values of stored in the linked list. 5. Declare a linked list which stores strings 6. Prompty the user to enter string values and add these values in the string linked list, stop 7. Prompty the user to enter k (the number of values to be removed), and remove k values 8. Print the values of stored in the linked list adding the values when the user enter "exit from the front The expected result: Create a list of integers: 10 20 30 40 50 60 70 80 90 0 Bow many values The liat is: 60 50 40 30 20 10 you want to remove? 3 Create a list of strings: Jin Tom Alice Bob Ellen Bella Smith Don exit How many values you want to renove? 3 The 1ist is: Ellen Bob Alice Tom Jim

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions