/* ************************************************************************** */ /* */ /* :::::::: */ /* WrongAnimal.cpp :+: :+: */ /* +:+ */ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/04/05 17:26:52 by whaffman #+# #+# */ /* Updated: 2025/04/14 21:38:18 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ #include "WrongAnimal.hpp" #include #include #include "colors.h" WrongAnimal::WrongAnimal() { this->type = "WrongAnimal"; std::cout << BACKGROUND1 << BOLD << "WrongAnimal" << RESET << " default constructor called" << std::endl; } WrongAnimal::WrongAnimal(const WrongAnimal &other) : type(other.type) { std::cout << BACKGROUND1 << BOLD << "WrongAnimal" << RESET << " copy constructor called" << std::endl; } WrongAnimal::~WrongAnimal() { std::cout << BACKGROUND1 << BOLD << "WrongAnimal" << RESET << " destructor called" << std::endl; } WrongAnimal &WrongAnimal::operator=(const WrongAnimal &other) { std::cout << BACKGROUND1 << BOLD << "WrongAnimal" << RESET << " assignment operator called" << std::endl; if (this == &other) return *this; type = other.type; return *this; } void WrongAnimal::makeSound(void) const { std::cout << BACKGROUND1 << BOLD << "WrongAnimal" << RESET << " Can't Speak" << std::endl; } std::string WrongAnimal::getType(void) const { return type; }