# Create a customer and add an account customer = Customer("John Doe", "123 Main St") account = CheckingAccount("123456789", customer, 1000, 500) customer.add_account(account)
# Define the Account class class Account: def __init__(self, account_number, account_holder, balance): self.account_number = account_number self.account_holder = account_holder self.balance = balance the object-oriented thought process 5th edition pdf github
def add_account(self, account): self.accounts.append(account) # Create a customer and add an account
def withdraw(self, amount): if amount > self.balance + self.overdraft_limit: raise ValueError("Insufficient funds") self.balance -= amount "123 Main St") account = CheckingAccount("123456789"