def make_deposit(self): """Function to make a deposit into a customer's account Args: None """ customer = self.bank.select_customer() # exit make_deposit if user types '0' without proceeding to deposit prompt if not customer: return None # select customer's account, display current balances, and prompt for deposit amount account = customer.account account.print_balance() amount = DataValidation.check_positive_float("How much would you like to deposit? ") # exit make_deposit if user types '0' without proceeding to deposit prompt if not amount: return None # deposit amount into account account.deposit(amount) return None
def make_withdrawal(self): """Function to withdraw money from an account in the bank Args: None """ customer = self.bank.select_customer() # exit make_withdrawal if user types '0' without proceeding to withdrawal prompt if not customer: return None # give customer ability to exit if they do not want to incur fee proceed = DataValidation.check_valid_yes_no("Withdrawals incur a $5.00 fee, would you like to proceed? (Y/N) ") # exit make_deposit if user types '0' without proceeding to deposit prompt if not proceed: return None # select customer's account, display current balances, and prompt for withdrawal amount account = customer.account account.print_balance() amount = DataValidation.check_positive_float("How much would you like to withdraw? ") # exit make_deposit if user types '0' without proceeding to withdrawal prompt if not amount: return None # withdraw amount from account account.withdraw(amount) return None