-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (22 loc) · 919 Bytes
/
main.py
File metadata and controls
34 lines (22 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from impostos import ICMS, ICPP, IKCV, ISS
class CalculadorImpostos:
def realiza_calculo(self, orcamento, imposto):
imposto_calculado = imposto.calcula(orcamento)
print(imposto_calculado)
if __name__ == '__main__':
from orcamento import Orcamento, Item
orcamento = Orcamento()
orcamento.adiciona_item(Item('item 0', 50.0))
orcamento.adiciona_item(Item('item 1', 200.0))
orcamento.adiciona_item(Item('item 2', 250.0))
calculador = CalculadorImpostos()
print('ISS e ICMS')
calculador.realiza_calculo(orcamento, ISS())
calculador.realiza_calculo(orcamento, ICMS())
print('ISS com ICMS')
calculador.realiza_calculo(orcamento, ISS(ICMS()))
print('ICPP e IKCV')
calculador.realiza_calculo(orcamento, ICPP())
calculador.realiza_calculo(orcamento, IKCV())
print('ICPP com IKCV')
calculador.realiza_calculo(orcamento, ICPP(IKCV()))