Advertisement
GastonPalazzo

Gold

Oct 11th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. #import
  2. from Cuenta import Cuenta
  3. from datetime import date, datetime
  4.  
  5. #class
  6. class Gold(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.         if monto<25000:
  15.             monto-=(monto*0.03)
  16.         super(Gold, self).acreditar(monto, medio) #paso de valores a la funcion de la clase padre
  17.     def debitar(self, monto, medio):
  18.         if medio == 'CajeroBanelco':
  19.             pass #no se agrega importe
  20.         elif medio == 'CajeroLink':
  21.             monto+=(monto*0.05)
  22.         elif medio == 'Caja':
  23.             pass #no se agrega importe
  24.         self.agregarPasivo(monto)
  25.         self._transacciones.append(f'{monto}, {medio}')
  26.         self._fechaUltimoMov=date.today()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement