Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __init__(self, cust_id, checking_total_amount):
- Account.__init__(self, cust_id)
- self.checking_total_amount = checking_total_amount
- def grab_from_savings(self):
- moved_amount = 0
- moved_amount.move_to_checking()
- self.checking_total_amount += moved_amount.move_to_checking()
- return self.checking_total_amount
- def __init__(self, cust_id, savings_total_amount):
- Account.__init__(self, cust_id)
- self.savings_total_amount = savings_total_amount
- def move_to_checking(self, amount_to_move):
- if amount_to_move <= self.savings_total_amount:
- self.savings_total_amount -= amount_to_move
- return amount_to_move
- else:
- return "insufficient funds!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement