/ CPP_Modules / CPP_Module_01 / ex01 / Zombie.cpp
Zombie.cpp
 1  /* ************************************************************************** */
 2  /*                                                                            */
 3  /*                                                        :::      ::::::::   */
 4  /*   Zombie.cpp                                         :+:      :+:    :+:   */
 5  /*                                                    +:+ +:+         +:+     */
 6  /*   By: gychoi <gychoi@student.42seoul.kr>         +#+  +:+       +#+        */
 7  /*                                                +#+#+#+#+#+   +#+           */
 8  /*   Created: 2023/07/24 22:46:03 by gychoi            #+#    #+#             */
 9  /*   Updated: 2023/07/25 17:01:32 by gychoi           ###   ########.fr       */
10  /*                                                                            */
11  /* ************************************************************************** */
12  
13  #include "Zombie.hpp"
14  
15  Zombie::~Zombie(void)
16  {
17  	std::cout << _name << " is destroyed." << std::endl;
18  }
19  
20  void	Zombie::setName(const std::string& name)
21  {
22  	_name = name;
23  }
24  
25  std::string	Zombie::getName(void) const
26  {
27  	return (_name);
28  }
29  
30  void	Zombie::announce(void)
31  {
32  	std::cout << getName() << ": BraiiiiiiinnnzzzZ..." << std::endl;
33  }