|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.japi.finance.InterestCalculator
public class InterestCalculator
Class contains some functionality for calculating capital after some periods of time.
| Constructor Summary | |
|---|---|
InterestCalculator(float initialCapital,
float interestRate)
|
|
| Method Summary | |
|---|---|
float |
calculateCapital(int numberOfPeriods)
Calculates the overall capital after some periods beginnig with given initial capital and interest rate. |
float |
getCurrentCapital()
Returns the current capital. |
float |
getInterestRate()
Returns the current interest rate. |
void |
resetCapital()
Resets the current capital to initial capital. |
void |
setCurrentCapital(float currentCapital)
Sets new current capital. |
void |
setInterestRate(float interestRate)
Sets new interest rate. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterestCalculator(float initialCapital,
float interestRate)
| Method Detail |
|---|
public float calculateCapital(int numberOfPeriods)
capital_after_n_periods = start_captial * ( 1 + p/100 )^n
(with p as interest rate)
numberOfPeriods -
public float getCurrentCapital()
public void setCurrentCapital(float currentCapital)
currentCapital - public void setInterestRate(float interestRate)
interestRate - public float getInterestRate()
public void resetCapital()
|
JAPI Yet another Java API API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||