Question
Create a class implementation of a linked list of pets. Each node should contain: (1) String Pet Name (i.e., Fido, Garfield, Snoopy, etc.) (2) String
Create a class implementation of a linked list of pets. Each node should contain:
(1) String Pet Name (i.e., Fido, Garfield, Snoopy, etc.)
(2) String Pet Type (i.e., Dog, Cat, Horse, etc.)
(3) Integer Pet Age
(4) Link to a node
Present a menu to the user when the program begins:
1. Display list (beginning at head, print Pet name, type, and age for entire list)
2. Add to head (should prompt user for Pet name, type, and age)
3. Add to tail (should prompt user for Pet name, type, and age)
4. Search given type (should prompt user for Pet type, display name and age of all matches)
5. Delete node given Pet name. Provide message regarding success of the deletion.
6. Print average age for all pets (iterative function)
7. Print average age for all pets (recursive version)
8. Quit
Upload a zipped file containing all source code and header files. Do not include other files. Only include .cpp and .h files.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started