Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Why is this code not working ? ? #include #include Dog.h #include Cat.h #include Bird.h void displayMenu ( ) { std::cout <
Why is this code not working #include
#include "Dog.h
#include "Cat.h
#include "Bird.h
void displayMenu
std::cout Pet Program
"Please enter for a Dog:
"Please enter for a Cat:
"Please enter for a Bird:
"Please enter to exit:
;
int main
int choice;
std::string fName, lName, pName;
int year;
std::string breed, color;
do
displayMenu;
std::cin choice;
switch choice
case :
Collect details for Dog and create Dog object, then print
break;
case :
Collect details for Cat and create Cat object, then print
break;
case :
Collect details for Bird and create Bird object, then print
break;
case :
std::cout "Exiting program.
;
break;
default:
std::cout "Invalid option. Please try again.
;
while choice ;
return ;
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