First version using OOP

This commit is contained in:
2025-01-24 16:42:13 -03:00
parent 8df1ae8f25
commit 8044fa3c32
12 changed files with 161 additions and 0 deletions

21
Gato.cpp Normal file
View File

@@ -0,0 +1,21 @@
#include "Gato.hpp"
#include <iostream>
using namespace std;
Gato::Gato(std::string nome){
cout << "Nasce um gatinho chamado " << nome << endl;
_nome = nome;
}
Gato::~Gato(){
cout << "E " << _nome << " nos deixou" << endl;
}
void Gato::acorda(){
mia();
}
void Gato::mia(){
cout << _nome << " faz MIAU" << endl;
}