Question

A web page with a form to compute the future value is displayed below.  The textbox is named Loan, the listbox is named Rate and the radiobuttons belong to a Year group.

Loan: 300000 Rate: 5% Select term: 15-year O 30-year Payment: $2,219 06 Compute Payment

(i) If the payment is computed by a JavaScript function named ComputePmt(), complete the ComputePmt function:

Function ComputePmt()

{

}

(ii).  If the form is processed by a JSP program named ComputePmt.jsp, complete the jsp program to compute the payment:

<%

%>

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ComputePmt.jsp

function ComputePmt()
{
  
   var loan=parseFloat(document.getElementById("Loan").value);
   var rate=parseFloat(document.getElementById("rate").value);
   var year=Number(document.getElementById("year").value);
   var interest=(loan*rate*year)/100; //implemented simple interest, change formula if required
var amt=loan+interest;
  
document.getElementById("payment").value="$"+amt;
}

Output:

Loan: 3125 4% 5% Rate: 5.5% Select Year: O 15-year 30-year Payment: $5234.375 Compute Payment

Add a comment
Know the answer?
Add Answer to:
A web page with a form to compute the future value is displayed below.  The textbox is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The present value of an annuity is the sum of the discounted value of all future...

    The present value of an annuity is the sum of the discounted value of all future cash flows. You have the opportunity to invest in several annuities. Which of the following 10-year annuities has the greatest present value (PV)? Assume that all annuities earn the same positive interest rate. bevinning of each year An annuity that pays $500 at the end of every six months An annuity that pays $1,000 at the beginning of each year An annuity that pays...

  • For milestone #1, we will start the CARIT site with three static HTML pages and a...

    For milestone #1, we will start the CARIT site with three static HTML pages and a CSS file. Create a dedicated folder for this project. This folder should contain all related files in this project. The future milestones are cumulative and built directly on top of your prior work. Function/content requirements: A home page named “index.html”, which include these contents at least: Description of the center. You may reference the example sites. Latest news: use list tags; make up some...

  • QUESTION 7 Select the correct EXCEL programming to compute the net present value of the cash...

    QUESTION 7 Select the correct EXCEL programming to compute the net present value of the cash flow stream below. A C D 1 Interest Rate 5% 2 Period CF 4 ($500.00) $100.00 5 6 1 $300.00 7 2 $500.00 $250.00 4 10 11 A. -NPV(C2,C5:C9,1) B. NPV(C2,C5:C9) C. PV(C2, C5:C9) D. C5+NPV(C2,C6:C9) E. NPV(C2,C5:C9,1) 00 9 QUESTION 8 The future value (at the terminal year) of the following cash flow time line (figure below) was computed. (i5% per year) The...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • And there was a buy-sell arrangement which laid out the conditions under which either shareholder could...

    And there was a buy-sell arrangement which laid out the conditions under which either shareholder could buy out the other. Paul knew that this offer would strengthen his financial picture…but did he really want a partner?It was going to be a long night. read the case study above and answer this question what would you do if you were Paul with regards to financing, and why? ntroductloh Paul McTaggart sat at his desk. Behind him, the computer screen flickered with...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT