feat: adding the ex02
This commit is contained in:
parent
921b3951d9
commit
e78b8fbe33
14 changed files with 539 additions and 0 deletions
28
cpp04/ex02/Cat.cpp
Normal file
28
cpp04/ex02/Cat.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Cat.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/30 13:32:43 by rparodi #+# #+# */
|
||||
/* Updated: 2025/02/10 12:22:32 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Cat.hpp"
|
||||
|
||||
Cat::Cat() {
|
||||
std::cout << "[Cat]\t\tCreating the class" << std::endl;
|
||||
type = "Cat";
|
||||
brain = new Brain();
|
||||
}
|
||||
|
||||
Cat::~Cat() {
|
||||
delete brain;
|
||||
std::cout << "[Cat]\t\tDeleting the class" << std::endl;
|
||||
}
|
||||
|
||||
void Cat::makeSound() const {
|
||||
std::cout << "🐱 | Meow Meow" << std::endl;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue