GUI help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dreamer1963
    New Member
    • Mar 2008
    • 6

    GUI help

    Write a Java program without a graphical user interface that calculates and displays the monthly mortgage payment amount, given the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage.

    · In this program, hard code the amount as $200,000, the term as 30 years, and the interest rate as 5.75%. Insert comments in the program to document the program.

    · Insert version control information in the program (Author, Modified Date, version, description).

    Then this was added.

    Looks like there is some confusion on how to go about doing the calculation... First take a look at the formula and break it down into meaningful steps. There are three inputs to the formula.
    a) Principal
    b) Annual Interest
    c) Loan years.

    Here is the formula: M = P * (J/ (1-(1+J)^ - N)). The following website does a wonderful job in dissecting the above formula. http://www.hughchou.or g/calc/formula.html
    Here,
    M = Mortgage Payment
    P = principal
    J = monthly interest
    N = Number of Months for loan.

    We already know P, J, N now we need to plug that in, in the formula. First lets take the denominator
    double denominator = Math.pow( 1 + monthlyInterest , -360); // this is the (1+J)^ - N
    well almost done, but still there is this (1 - (1+ J)^ - N)... so, denominator = 1 - denominator;

    Now, the easy part, (top half) P * (J/denomiator))
    double monthlyPayment = principal * (monthlyInteres t/denominator);

    I am so confused. I do not even know where to start. Please help.
  • dreamer1963
    New Member
    • Mar 2008
    • 6

    #2
    I do not want anyone to write this program, only to tell me how to go about it. Please help.

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by dreamer1963
      I do not want anyone to write this program, only to tell me how to go about it. Please help.
      Did you do the part that the question asked you to do first?

      Comment

      Working...