|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--bank.Account | +--bank.Savings
Field Summary | |
static double |
intRate
|
Fields inherited from class bank.Account |
acctNum, balance, PIN |
Constructor Summary | |
Savings()
Creates a default new instance of Savings |
|
Savings(java.lang.String pin,
double bal)
Creates a new instance of Savings given a pin and balance |
|
Savings(java.lang.String acct,
java.lang.String pin,
double bal)
Creates a new instance of Savings given an account number, pin and balance |
Method Summary | |
static double |
getIntRate()
we need a way of determining the interest rate Static - since interest rate is static - once per class |
double |
getIntYTD()
report the year to date interest |
static void |
main(java.lang.String[] args)
|
double |
payInterest(int numDays)
pay interest into the calling Account based on the number of days paying interest for (also, the class knows the interest rate) Return: amount of interest paid |
boolean |
payInterestfirstVersion(int numDays)
MAR - I think the above is better pay interest into the calling Account based on the number of days paying interest for (also, the account knows the interest rate) Return: whether interest is paid |
double |
processMonthEnd()
process month end - pay interest into the calling Account default version - pays based on 30 day months Return: new balance |
double |
processMonthEnd(int days)
process month end - pay interest into the calling Account default version - pays based on days in month - passed Return: new balance |
void |
resetIntYTD()
reset the year to date interest back to zero |
static void |
setIntRate(double rate)
we need a way of setting the interest rate Static - since interest rate is static - once per class |
void |
setIntYTD(double amt)
change the year to date interest |
java.lang.String |
toString()
Override Account's toString |
Methods inherited from class bank.Account |
compareTo, deposit, depositEx, equals, getAcctID, getAcctNum, getBal, getPin, matchAcctNum, matchAcctNum, setAcctId, setAcctNum, setBal, setPIN, withdraw |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static double intRate
Constructor Detail |
public Savings()
public Savings(java.lang.String pin, double bal)
public Savings(java.lang.String acct, java.lang.String pin, double bal)
Method Detail |
public double payInterest(int numDays)
public boolean payInterestfirstVersion(int numDays)
public double processMonthEnd()
public double processMonthEnd(int days)
public double getIntYTD()
public static double getIntRate()
public java.lang.String toString()
toString
in class bank.Account
public void setIntYTD(double amt)
public void resetIntYTD()
public static void setIntRate(double rate)
public static void main(java.lang.String[] args)
args
- the command line arguments
little test driver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |