Create a structure named dog with a string field for the


Question: Create a Structure named dog with a string field for the Dog's name. Create a Structure named Cat with a string field for the Cat's name.

Program: Write a program that declares one Dog and one Cat, and assign names to them. Write two overloaded functions named speak(). If you pass the Dog to speak(), the speak() function should display the Dog's name and a description of how dogs speak(For example, "Spot says woof").

If you pass the Cat to the verison of speak() that accepts a Cat parameter, then it should display the Cat's name and a description of how cats speaks( For example, " Tiger says meow"). Save as CatDog.cpp.

Please only use things learned in the first six chapters of Object oriented programming using C++ by Joyce Farrel.

Please do not use code that would not have been learned in those chapters - Prepare a Structure named dog with a string field for the Dog's name and prepare a Structure named Cat with a string field for the Cat's name.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Create a structure named dog with a string field for the
Reference No:- TGS0960575

Expected delivery within 24 Hours