feat: finishing the ex00 of the module 04
This commit is contained in:
parent
1c1e515ceb
commit
cbb34cf2e0
13 changed files with 181 additions and 36 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/30 13:21:01 by rparodi #+# #+# */
|
||||
/* Updated: 2025/01/30 13:37:51 by rparodi ### ########.fr */
|
||||
/* Updated: 2025/01/31 19:53:47 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -14,19 +14,18 @@
|
|||
#include <iostream>
|
||||
|
||||
Animal::Animal() {
|
||||
std::cout << "[Animal] Creating the class" << std::endl;
|
||||
std::cout << "[Animal]\tCreating the class" << std::endl;
|
||||
type = "";
|
||||
}
|
||||
|
||||
Animal::~Animal() {
|
||||
std::cout << "[Animal] Deleting the class" << std::endl;
|
||||
std::cout << "[Animal]\tDeleting the class" << std::endl;
|
||||
}
|
||||
|
||||
void Animal::makeSound() {
|
||||
if (type.compare("Cat"))
|
||||
std::cout << "🐱 | Meow Meow" << std::endl;
|
||||
else if (type.compare("Dog"))
|
||||
std::cout << "🐶 | Wouf Wouf" << std::endl;
|
||||
else
|
||||
std::string Animal::getType() const {
|
||||
return (type);
|
||||
}
|
||||
|
||||
void Animal::makeSound() const {
|
||||
std::cout << "🤔 | thinking how to make a sound" << std::endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue