Martin Unger

Greenhorn

Posts: 2

posted 2 years ago

Dear Java Developers

Can anyone help me to solve this problem ... i do not understand so much this problem

I tried this:

Thank you

Can anyone help me to solve this problem ... i do not understand so much this problem

I tried this:

Thank you

posted 2 years ago

Welcome to the Ranch!

When you post a program, please UseCodeTags (← that's a link). I've added them for you this time.

What exactly are you having trouble with? Please TellTheDetails.

When you post a program, please UseCodeTags (← that's a link). I've added them for you this time.

What exactly are you having trouble with? Please TellTheDetails.

All things are lawful, but not all things are profitable.

Martin Unger

Greenhorn

Posts: 2

posted 2 years ago

Hi Thank you for editing

From exercise i should find with formula payment ={(1+i)^y*p*i}/{(1+i)^y-1)*12} ... i don't know what is 'i' from here

also input: the down payment on the loan for the house ...is this rate inters or first payment for the house

and last input: the monthly utility expenses ... i don't know which expenses

From exercise i should find with formula payment ={(1+i)^y*p*i}/{(1+i)^y-1)*12} ... i don't know what is 'i' from here

also input: the down payment on the loan for the house ...is this rate inters or first payment for the house

and last input: the monthly utility expenses ... i don't know which expenses

posted 2 years ago

What a strange formula. I'm afraid not correct, missing or extra parentheses.

What meaning of "curly braces" are? Since it is not a function, i'm a bit confused. Well, I might forgot all these things already..

Martin Unger wrote:From exercise i should find withformulapayment ={(1+i)^y*p*i}/{(1+i)^y-1)*12}

What a strange formula. I'm afraid not correct, missing or extra parentheses.

What meaning of "curly braces" are? Since it is not a function, i'm a bit confused. Well, I might forgot all these things already..

Piet Souris

Master Rancher

Posts: 2044

75

posted 2 years ago

Apart from a missing '(' in the denominator, the formula is correct.

Unfortunately, in this form the formula is unrecognizable and

impossible to decipher and remember.

In this topic:

http://www.coderanch.com/t/624366/java/java/Writing-formula-Java

I give a much simpler to remember form, including a derivation.

The í' is simply the annual interest rate. What happens here, implicitly, is

that we are dealing with a normal annuity loan, where the annual payment

is calculated, given the duration n, the face value p of the loan, and in annual

interest rate i.

So, in fact, the outcome would be that you pay back the whole loan if you do

just one payment, at the end of every year t (t = 1, 2, ..., n).

But these bankmen then divide the year payment by 12, and let you pay

that amount every month. In effect, you then have a real interest rate that

is slightly more than the communicated interest rate 'i'. Hmm... not nice,

but standard practise.

That's where the '12' in the denominator is coming from.

After this long introduction

the monthly payment can be calculated with the given horrible formula,

but taking as loan (the 'p' in the formula) the price of the house minus the

down payment. Well, I just had a look up of what 'down payment' is via

Google Translate, and it is the initial payment, the part of the house price that you

pay with own money. Correct me if I'm wrong here.

The monthly utility expenses are input.

The interest rate should also be input, somewhere. Strange that it is not mentioned

in the exercise.

Finally, the last question is a bit strange. Are you supposed to simply

add up the total monthly payments, for as long as the loan is not

fully repaid? Or are you supposed to calculate the so called present value

of all these payments? Is that given somewhere in the text book?

Greetz,

Piet

Unfortunately, in this form the formula is unrecognizable and

impossible to decipher and remember.

In this topic:

http://www.coderanch.com/t/624366/java/java/Writing-formula-Java

I give a much simpler to remember form, including a derivation.

The í' is simply the annual interest rate. What happens here, implicitly, is

that we are dealing with a normal annuity loan, where the annual payment

is calculated, given the duration n, the face value p of the loan, and in annual

interest rate i.

So, in fact, the outcome would be that you pay back the whole loan if you do

just one payment, at the end of every year t (t = 1, 2, ..., n).

But these bankmen then divide the year payment by 12, and let you pay

that amount every month. In effect, you then have a real interest rate that

is slightly more than the communicated interest rate 'i'. Hmm... not nice,

but standard practise.

That's where the '12' in the denominator is coming from.

After this long introduction

the monthly payment can be calculated with the given horrible formula,

but taking as loan (the 'p' in the formula) the price of the house minus the

down payment. Well, I just had a look up of what 'down payment' is via

Google Translate, and it is the initial payment, the part of the house price that you

pay with own money. Correct me if I'm wrong here.

The monthly utility expenses are input.

The interest rate should also be input, somewhere. Strange that it is not mentioned

in the exercise.

Finally, the last question is a bit strange. Are you supposed to simply

add up the total monthly payments, for as long as the loan is not

fully repaid? Or are you supposed to calculate the so called present value

of all these payments? Is that given somewhere in the text book?

Greetz,

Piet