Greetings and salutations!
Hope it's a good week thus far...
Got myself thinking and wanted to see what can be achieved with a certain bit of code:
[CODE=JAVA]
public double getPayment( ) {
double mPayment;
mPayment = (loanAmount * interestRate)
/
(1 - Math.pow(1/(1 + interestRate),
numPayments ) );
return mPayment;
}
[/CODE]
This calculates interest rate for a certain loan amount, per mothly payments. Question is can we turn around and doctor this up to calculate weekly payments as in instead of using it as interest rate, it is used as commission rate whereby the end result is a weekly reward on one's check for a certain amount of sales.
This is homework so I am not expecting the year book answer on this one, just a simple direction will do, surely can read between the lines;-)
I am almost satisfied with it thus far, and in due time I'll nail it right. I have since removed the code above and wanted to reinstate it only if in fact it is valuable, otherwise, will keep coding...
Perhaps this may me be of aid if you can tell me, here is an excerpt of the code above:
[CODE=JAVA]
what is 1 in:
(1 - Math.pow
what is 1 in:
pow(1/
what is 1 in:
(1 + interestRate
[/CODE]
I think if I can at least figure that out, I'm on my way. What are you thoughts? Can this be done?
Thanks for your help;-)
Dököll
Hope it's a good week thus far...
Got myself thinking and wanted to see what can be achieved with a certain bit of code:
[CODE=JAVA]
public double getPayment( ) {
double mPayment;
mPayment = (loanAmount * interestRate)
/
(1 - Math.pow(1/(1 + interestRate),
numPayments ) );
return mPayment;
}
[/CODE]
This calculates interest rate for a certain loan amount, per mothly payments. Question is can we turn around and doctor this up to calculate weekly payments as in instead of using it as interest rate, it is used as commission rate whereby the end result is a weekly reward on one's check for a certain amount of sales.
This is homework so I am not expecting the year book answer on this one, just a simple direction will do, surely can read between the lines;-)
I am almost satisfied with it thus far, and in due time I'll nail it right. I have since removed the code above and wanted to reinstate it only if in fact it is valuable, otherwise, will keep coding...
Perhaps this may me be of aid if you can tell me, here is an excerpt of the code above:
[CODE=JAVA]
what is 1 in:
(1 - Math.pow
what is 1 in:
pow(1/
what is 1 in:
(1 + interestRate
[/CODE]
I think if I can at least figure that out, I'm on my way. What are you thoughts? Can this be done?
Thanks for your help;-)
Dököll
Comment