Zombie.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* Zombie.cpp :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@gmail.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2025/07/15 13:44:24 by bchanot #+# #+# */
  9. /* Updated: 2025/07/15 14:48:08 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "Zombie.hpp"
  13. #include <iostream>
  14. Zombie::Zombie(std::string name) : _name(name) {
  15. std::cout << "Constructor of " << name << "called" << std::endl;
  16. return ;
  17. }
  18. Zombie::Zombie(void) : _name("defaultName") {
  19. std::cout << "Constructor of " << this->_name << "called" << std::endl;
  20. return ;
  21. }
  22. Zombie::~Zombie(void) {
  23. std::cout << "Destructor of " << this->_name << "called" << std::endl;
  24. return ;
  25. }
  26. void Zombie::announce(void) const {
  27. std::cout << this->_name << ": BraiiiiiiiinnnnzzzzZ..." << std::endl;
  28. }
  29. void Zombie::setZombie(std::string name) {
  30. this->_name = name;
  31. }