Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Loan Calculator. create an application that displays a monthly payment on a loan. The application should also display the amount applied to the loan's principal

Loan Calculator. create an application that displays a monthly payment on a loan. The application should also display the amount applied to the loan's principal each month and the amount that represent interest.The method's syntax is Financial.PPmt(Rate, Per, NPer, PV). The method returns the calculated value as a Double number. Where I am going wrong?

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load ' fills the combo box with values

For term As Integer = 1 To 30 termComboBox.Items.Add(term.ToString) Next term termComboBox.SelectedItem = "30"

For annualrate As Double = 0.02 To 0.1 Step 0.01 rateComboBox.Items.Add(annualrate.ToString) Next annualrate

End Sub

Private Sub DisplayButton_Click(sender As Object, e As EventArgs) Handles displayButton.Click ' display the monthly payment Dim monthlypayment As Double Dim principal As Double Dim rate As Double Dim term As Integer Dim loan As Double Dim interestrate As Double

Double.TryParse(rateComboBox.Text, rate) Double.TryParse(principalTextBox.Text, principal) ListBox.Items.Clear() ListBox.Items.Add("Principal Interest") term = Convert.ToInt32(termComboBox.Text)

For period As Double = 0.02 To 0.1 Step 0.01 monthlypayment = -Financial.PPmt(rate / 12, period, term, loan) rate = loan - principal ListBox.Items.Add(" " & principal.ToString("C2") & " " & " " & rate.ToString("C2")) Next period End Sub

Private Sub PrincipalTextBox_TextChanged(sender As Object, e As EventArgs) Handles principalTextBox.TextChanged

End Sub

Private Sub ExitButton_Click(sender As Object, e As EventArgs) Handles exitButton.Click Me.Close() End Sub End Class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

1. Identify what positions are included in the plan.

Answered: 1 week ago