Java Servlet question from into to java programming by Liang Exercise 37.5 Calcu
ID: 3678343 • Letter: J
Question
Java Servlet question from into to java programming by Liang
Exercise 37.5 Calculate Loan
(Calculate loan) Write an HTML form that prompts the user to enter loan amount, interest rate, and number of years, as shown in Figure 37.31a. Clicking the Compute Loan Payment button invokes a servlet to compute and display the monthly and total loan payments, as shown in Figure 37.31b. Use the Loan class given in Listing 10.2, Loan.java, to compute the monthly and total payments.
Figure 37.31
Explanation / Answer
#include using namespace std; int main() { double monthlyPayment; double balance; double interestRate; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); cout > balance; cout > interestRate; cout > monthlyPayment; while (interestRate >= 1) { interestRate = interestRate / 100; } balance = balance * (1 + interestRate / 12) - monthlyPayment; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.