Create a mortgage calculator app that allows the user to enter a purchase price, down payment amount and an interest rate. Based on these values, the app should calculate the loan amount (purchase price minus down payment) and display the monthly payment for 10, 20 and 30 years loans. Allow the user to select a custom loan duration in years (<= 30 years) by using a SeekBar and display the monthly payment for that custom loan duration.
The following formula is used to calculate the fixed monthly payment (P) required to fully amortize a loan of L dollars over a term of n months at a monthly interest rate of c. If the quoted rate is 6%, for example, c is .06/12 or .005.
P = L[c(1 + c)n]/[(1 + c)n - 1]Attachments