This problem is a slight variation of PP 3 for chapter 4, including the messages
ID: 3741223 • Letter: T
Question
This problem is a slight variation of PP 3 for chapter 4, including the messages for wrong entries except that I can not get the monthly payment to appear in the txtPayment textbox, for some reason it places the total interest payment in both the monthly payment display box as well as the total interest display box. How do i get the monthly payment to appear in the proper box (txtPayment), please help. Think I might just be missing a few lines of code near the end.
Car Loan Write a program to analyze a car loan. See Fig. 4.60. The user should enter the amount of the loan, the annual percentage rate of interest, and the duration of the loan in months. When the user clicks on the button, the information that was entered should be checked to make sure it is reasonable. If bad data have been supplied, the user should be so advised. Otherwise, the monthly payment and the total amount of interest paid should be displayed. The formula for the monthly payment is monthly payment (1 + r)-n where p is the amount of the loan, r is the monthly interest rate (annual rate divided by 12) given as a number between 0 (for 0 %) and 1 (for 100 %), and n is the duration of the loan in months. The formula for the total interest paid is total interest-n [monthly payment-p Car Loan Amount of loan: 18000 Interest rate: such as 5.25) 525 Duration in months: 60 Analyze Monthly payment: $341.75 Total interest paid: $2,504.86 Possible outcome of Programming Project 3. FIGURE 4.60Explanation / Answer
You have done everything perfect. The only issue is you printed total_interest in both txtPayment.Text and txtTotalInterest.Text.
txtPayment.Text = FormatCurrency(payment)
The above line will print monthly payment in txtPayment field.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.