36 lines
724 B
C++
36 lines
724 B
C++
# include "WrongCat.hpp"
|
|
|
|
WrongCat::WrongCat () : WrongAnimal()
|
|
{
|
|
_type = "WrongCat";
|
|
std::cout << "WrongCat constructor called\n";
|
|
}
|
|
|
|
WrongCat::WrongCat (std::string type) : WrongAnimal(type)
|
|
{
|
|
_type = type;
|
|
std::cout << "WrongCat constructor called\n";
|
|
}
|
|
|
|
WrongCat::WrongCat(const WrongCat &other) : WrongAnimal()
|
|
{
|
|
*this = other;
|
|
std::cout << "WrongCat copy constructor called\n";
|
|
}
|
|
|
|
WrongCat &WrongCat::operator=(const WrongCat &other)
|
|
{
|
|
_type = other._type;
|
|
std::cout << "WrongCat copy assignment constructor called\n";
|
|
return (*this);
|
|
}
|
|
|
|
WrongCat::~WrongCat()
|
|
{
|
|
std::cout << "WrongCat deconstructor called\n";
|
|
}
|
|
|
|
void WrongCat::makeSound() const
|
|
{
|
|
std::cout << "wrongmiaou wrongmiaou wrongmiaou\n";
|
|
} |