Solução - Criando a classe Pessoa

This commit is contained in:
Luiz Otávio
2022-12-02 07:33:07 -03:00
parent 62d3de84a6
commit 54c01673de
2 changed files with 21 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ Conta (ABC)
ContaCorrente
ContaPoupanca
Pessoa (ABC)
Pessoa
Cliente
Clente -> Conta

20
aula158/pessoas.py Normal file
View File

@@ -0,0 +1,20 @@
class Pessoa:
def __init__(self, nome: str, idade: int) -> None:
self.nome = nome
self.idade = idade
@property
def nome(self):
return self._nome
@nome.setter
def nome(self, nome: str):
self._nome = nome
@property
def idade(self):
return self._idade
@idade.setter
def idade(self, idade: int):
self._idade = idade