Advertisement
GastonPalazzo

Classic

Oct 11th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. #import
  2. from Cuenta import Cuenta
  3. from datetime import date, datetime
  4.  
  5. #class
  6. class Classic(Cuenta):
  7.     #cnstr
  8.     def __init__(self, CBU, activos):
  9.         super().__init__(CBU, activos)
  10.     #
  11.     #meths
  12.         #especificos
  13.     def acreditar(self, monto, medio):
  14.         monto-=(monto*0.05)
  15.         super(Classic, self).acreditar(monto, medio) #paso de valores a la funcion de la clase padre
  16.  
  17.     def debitar(self, monto, medio):
  18.         if medio == 'CajeroBanelco':
  19.             monto+=(monto*0.05)
  20.         elif medio == 'CajeroLink':
  21.             monto+=(monto*0.1)
  22.         elif medio == 'Caja':
  23.             pass #no se agrega importe
  24.         self.setActivos(-monto)
  25.         self._transacciones.append(f'{-monto}, {medio}')
  26.         self._fechaUltimoMov=date.today()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement