/* ************************************************************************** */ /* */ /* :::::::: */ /* Dog.cpp :+: :+: */ /* +:+ */ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/04/05 17:06:12 by whaffman #+# #+# */ /* Updated: 2025/04/14 14:46:46 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ #include "Dog.hpp" #include #include #include "colors.h" Dog::Dog() { this->type = "Dog"; std::cout << BACKGROUND11 << BOLD << "Dog" << RESET << " default constructor called" << std::endl; } Dog::Dog(const Dog &other) : Animal(other) { std::cout << BACKGROUND11 << BOLD << "Dog" << RESET << " copy constructor called" << std::endl; } Dog::~Dog() { std::cout << BACKGROUND11 << BOLD << "Dog" << RESET << " destructor called" << std::endl; } Dog &Dog::operator=(const Dog &other) { std::cout << BACKGROUND11 << BOLD << "Dog" << RESET << " assignment operator called" << std::endl; if (this == &other) return *this; type = other.type; return *this; } void Dog::makeSound(void) const { std::cout << "Woof" << std::endl; }