29 this->type =
"WrongCat";
The WrongAnimal class represents a generic animal, used to demonstrate the LACK of polymorphism when ...
WrongAnimal & operator=(const WrongAnimal &other)
Copy assignment operator for WrongAnimal. Assigns the type from the other WrongAnimal object....
The WrongCat class represents a feline animal in the "wrong" hierarchy.
WrongCat()
Default constructor for WrongCat. Calls the WrongAnimal base class constructor and sets the type to "...
virtual ~WrongCat()
Destructor for WrongCat. Displays a specific destruction message.
WrongCat & operator=(const WrongCat &other)
Makes the characteristic sound of a WrongCat ("Wrong meow!").
void makeSound() const
Makes the characteristic sound of a WrongCat ("Wrong meow!").
Declares the WrongCat class.