Question: HW 4b -Write a program that creates a linked list of Dogs Create a new project and name it: Linked List Create 2 Files in
HW 4b -Write a program that creates a linked list of Dogs Create a new project and name it: Linked List Create 2 Files in the project: . Dog.h . main.cpp Description: Create a linked list of Dogs. . Each node is an object of struct Dog o Each Dog object has a name (string). . Place your struct Dog in a header file named: Dog.h In driver.cpp, use a while loop to create a linked list of Dog objects. o Insert at least 3 dogs into a linked list. to quit the loop OUTPUT Enter a dog name ( to quit): ?with each iteration do the following: .Ask the user for a Dog's name. . Read in the name. . Call a function named: insertNode0 Bud Big Boy Spot White Lightning User enters to quit Display the list (Y/N)? y The function is a void-returning function.// acreen clears LIST OF DOGS . Pass the head pointer to the function. . The function created a new Dog object . Assign the name to the new object.2.)pot NAME Assign the name to the new object.: pste Lightning Connect the new object to the list. Connect the new objt the itBig y Bud . After creating a list of at least 3 Dogs, clear the screen. Prompt the user if he or she wishes to see the list o If yes, then call displayAllNodes0 to display the list. . Then clear the screen. Finally, call a searchList0 function. o The function prompts the user to enter a dog name. o Then the function uses while loop to go through the list to find the name. o If the name is in the list, output that the name has been found. o If not in the list, output that the name was not found
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
