Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercicio casa #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions exercicios/para-casa/andrezacasa/exercextraaa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
class Funcionario:
def __init__(self,nome):
self.nome = str(nome)
self.salario = 0

def calcularPagamento(self):
pass

class Temporario(Funcionario):
def __init__(self,nome,salarioporhora,hora):
self.nome = str(nome)
self.salarioporhora = salarioporhora
self.hora = hora

def calcularPagamento(self):
salario = self.salarioporhora * self.hora
return salario

class FuncionarioIntegral(Funcionario):
def __init__(self, nome, salariomensal):
super().__init__(nome)
self.salariomensal = salariomensal

def calcularPagamento(self):
return self.salariomensal

marcinhatabata_funcionario = FuncionarioIntegral ('Marcinha Tabata',20.000)
fatinha_funcionario = Temporario ('Fatinha Rodrigues',1500, 10)

print (marcinhatabata_funcionario.calcularPagamento())
print (fatinha_funcionario.calcularPagamento())


#REALIZADO EM GRUPO
35 changes: 35 additions & 0 deletions exercicios/para-casa/andrezacasa/herancaaa.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Veiculo:
def __init__(self,modelo,ano,preco):
self.modelo = modelo
self.ano= ano
self.preco = preco

def calcular_imposto_carro(self):
imposto = self.preco * 0.1
return imposto

class Carro(Veiculo):
def __init__(self, modelo, ano, preco,marca):
super().__init__(modelo, ano, preco)
self.marca = marca

def calcular_desconto(self):
desconto = self.preco * 0.05
return desconto

class Moto(Veiculo):
def __init__(self, modelo, ano, preco,cilindrada):
super().__init__(modelo, ano, preco)
self.cilindrada = cilindrada

def calcular_imposto_moto(self):
imposto = self.preco * 0.05
return imposto

carro_andreza = Carro('esportivo', 2023, 920.000, 'porsche taycan')
moto_marcinha = Moto('custom-harley davidson', 2023, 50.000, 1600)

print(carro_andreza.calcular_imposto_carro())
print(moto_marcinha.calcular_imposto_moto())

#EXERCICIO REALIZADO EM GRUPO