29 lines
829 B
C++
29 lines
829 B
C++
#include "WrongAnimal.hpp"
|
|
#include <iostream>
|
|
|
|
WrongAnimal::WrongAnimal() { std::cout << __PRETTY_FUNCTION__ << std::endl; }
|
|
|
|
WrongAnimal::WrongAnimal(const WrongAnimal &other) {
|
|
std::cout << __PRETTY_FUNCTION__ << std::endl;
|
|
type = other.type;
|
|
}
|
|
|
|
WrongAnimal::~WrongAnimal() { std::cout << __PRETTY_FUNCTION__ << std::endl; }
|
|
|
|
WrongAnimal &WrongAnimal::operator=(const WrongAnimal &other) {
|
|
std::cout << __PRETTY_FUNCTION__ << std::endl;
|
|
this->type = other.type;
|
|
return *this;
|
|
}
|
|
|
|
std::string WrongAnimal::getType() const { return type; }
|
|
|
|
void WrongAnimal::makeSound() const {
|
|
if (type == "WrongCat") {
|
|
std::cout << "[Eldritch Meow]" << std::endl;
|
|
} else if (type == "WrongDog") {
|
|
std::cout << "[Eldritch Bark]" << std::endl;
|
|
} else {
|
|
std::cout << "[Eldritch WrongAnimal Sound]" << std::endl;
|
|
}
|
|
}
|