class documentation
class PredatoryCreditCard(CreditCard):
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 |
Assess monthly interest on outstanding balance. |
Instance Variable | _apr |
Undocumented |
Inherited from CreditCard
:
Method | get |
Return the card's identifying number (typically stored as a string). |
Method | get |
Return current balance. |
Method | get |
Return the bank's name. |
Method | get |
Return name of the customer. |
Method | get |
Return current credit limit. |
Method | make |
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 |
overrides
dsap.oop.credit_card.CreditCard.__init__
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)
overrides
dsap.oop.credit_card.CreditCard.charge
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.