Question: In this lab you are required to create a class called Animal with the private fields called name and sound The Animal class should have

 In this lab you are required to create a class called

In this lab you are required to create a class called Animal with the private fields called name and sound The Animal class should have the following definition clast Anina1{ private: string name: string sound: public: Animal(const string& n = const string& s = "") string gat Name() coast: string make Sound() const: The public methods of the class Animal are the constructor, which initialises and sound get Name() which returns the name of the animal and make Sound(). which returns the sound an animal makes. You must overload the operator " says ' Input Main: int main() (Animal* monkey = new Animal("Frank" "Squeak") Animal* tiger = new Animal("Simba" "woof") Animal" Dog = new Animal ("Petals" "woof") cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!