class documentation

class PredatoryCreditCard(CreditCard):

View In Hierarchy

An extension to CreditCard that compounds interest and fees.

Method __init__ Create a new predatory credit card instance.
Method charge Charge given price to the card, assuming sufficient credit limit.
Method process_month Assess monthly interest on outstanding balance.
Instance Variable _apr Undocumented

Inherited from CreditCard:

Method get_account Return the card's identifying number (typically stored as a string).
Method get_balance Return current balance.
Method get_bank Return the bank's name.
Method get_customer Return name of the customer.
Method get_limit Return current credit limit.
Method make_payment Process customer payment, which reduces balance.
Instance Variable _account Undocumented
Instance Variable _balance Undocumented
Instance Variable _bank Undocumented
Instance Variable _customer Undocumented
Instance Variable _limit Undocumented
def __init__(self, customer, bank, acnt, limit, apr):

Create a new predatory credit card instance.

The initial balance is zero.

customer the name of the customer (e.g., 'John Bowman') bank the name of the bank (e.g., 'California Savings') acnt the acount identifier (e.g., '5391 0375 9387 5309') limit credit limit (measured in dollars) apr annual percentage rate (e.g., 0.0825 for 8.25% APR)

def charge(self, price):

Charge given price to the card, assuming sufficient credit limit.

Return True if charge was processed. Return False and assess $5 fee if charge is denied.

def process_month(self):

Assess monthly interest on outstanding balance.

_apr =

Undocumented