fork download
  1. class Funcionario:
  2.  
  3. def __init__(self, nome, salario, cpf):
  4. self.nome = nome
  5. self.salario = salario
  6. self.cpf = cpf
  7.  
  8. def getBonificacao(self):
  9. return self.salario * 0.10
  10.  
  11.  
  12. class Gerente(Funcionario):
  13.  
  14. def getBonificacao(self):
  15. return super().getBonificacao() + 1000
  16.  
  17.  
  18. gF = Gerente("weliton", 312.22, "332322333")
  19. print(gF.getBonificacao())
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
1031.222