class documentation
class CreditCard:
Known subclasses: dsap.oop.predatory_credit_card.PredatoryCreditCard
A consumer credit card.
Method | __init__ |
Create a new credit card instance. |
Method | charge |
Charge the given price to the card, assuming sufficient credit limit. |
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 |
overridden in
dsap.oop.predatory_credit_card.PredatoryCreditCard
Create a new 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)
overridden in
dsap.oop.predatory_credit_card.PredatoryCreditCard
Charge the given price to the card, assuming sufficient credit limit.
Return True if charge was processed; False if charge was denied.