Microsoft Word - Ass 2 ACME Bank Mortgage Calculator.docx CMPP 269 Assignment 2 ACME Bank Mortgage Calculator Please Submit via D2L. You have recently been hired at the ACME Bank Ltd. to write a...

solution needs to match testplan


Microsoft Word - Ass 2 ACME Bank Mortgage Calculator.docx CMPP 269 Assignment 2 ACME Bank Mortgage Calculator Please Submit via D2L. You have recently been hired at the ACME Bank Ltd. to write a program to calculate monthly payments for mortgages and produce a term schedule. Only customers with a validated account number will be allowed to access the program. The account number will be 8 digits long and the last digit is a check digit. To calculate the check digit use the following algorithm: Account Number Verification Account number 2 3 2 6 4 6 1 9 Double every other digit 2 6 2 12 4 12 1 39 Sum 9 sum mod 10 Check Digit Your program should check that the account number is:  digits only (no other characters)  8 digits long  final digit matches the calculated check digit The user will input the principal amount, the mortgage term and mortgage amortization in years. The choices for the mortgage amortization is are 5, 10, 15, 20 and 25 years. The mortgage rates are to be set in the program based on the mortgage term and are:  1 year 3.59%  2 year 3.74%  3 year 2.96%  5 year 3.29%  10 year 6.10% The program is to perform error checking for mortgage terms as well as the amortization period. Use Math.pow() to calculate the powers. Mortgage interest rates in Canada are bit complicated, banks post an annual rate but the interest rate is compounded semi-annually onto the mortgage. To compute the effect monthly rate use the following formula: EMR = ((1 + A/2)2)1/12 - 1 Where:  A – Annual Rate (as per the table above)  EMR – effective Monthly Rate Example: A = 0.06 *(6%) EMR = ((1 + 0.06/2)2)1/12 – 1 EMR = ((1 + 0.03)2)1/12 – 1 EMR = (1.0609)1/12 – 1 EMR = 1.00493862- 1 EMR = 0.00493862 The formula to calculate the monthly payment is: ? = ?[???(1 + ???) ]/[(1 + ???) − 1] Where:  M is the monthly payment  P is the principal amount  EMR is the effective monthly rate as previously calculate  n is the number of monthly payments (years * 12) For a $100,000 mortgage amount at 6% compounded semi-annually with an amortization of 15 years: EMR = 0.00493862 n = 12 x 15 = 180 monthly payments M = 100000[0.00493862(1 + 0.00493862) ]/[(1 + 0.00493862) − 1] M = 839.88 Resources:  Spreadsheet version of the mortgage calculator: http://www.yorku.ca/amarshal/CMTGMONT.xls o This is the best version, montly payment is correct, term schedule is correct. Results may differ by a few pennies as the spreadsheet does all calculations rounded and I don’t in the java code.  Web-enabled version : https://tools.td.com/mortgage-payment-calculator/ o The monthly payment is correct but TD Canada Trust calculates the monthly interest slightly differently in the Term Schedule. To figure out how much of the monthly payment will be applied to the principle and how much needs to be paid to the bank as interest we use the following formula: MI = (OB*EMR) MP = M – MI CB = OB – MP Where:  OB - Opening Balance at the start of the month  EMR - Effective Monthly Rate (as previous calculated)  M - monthly payment (as previously calculated)  MP - monthly principle amount  MI - monthly interest  CB – closing balance at the end of the month For Example: OB = 100,000 EMR = 0.00493862 M = 839.88 MI= (OB*EMR) MI = (100,000*0.00493862) MI = 493.86 (Monthly Interest) MP = M – MI MP = 839.88 – 493.86 MP = 346.02 CB = OB – MP CB = 100,000 – 346.02 CB = 99,653.98 The following is a sample run, user input is shown in bold underline. Note: Because we are NOT calculating values using rounded pennies, results shown below may differ from the mortgage calculators provided in the resoures section BUT only by a few accumulating pennies. Sample Run: Enter account number:2x3264619 Invalid account number, the account number needs to be 8 digits Enter account number:232 Invalid account number, the account number needs to be 8 digits Enter account number:23264617 Invalid account number, check digit does not match last digit! Enter account number:23264618 Invalid account number, check digit does not match last digit! Enter account number:23264619 Enter Client Name: Harvey Wallbanger Enter Address of Mortgage property: 123 Main St Enter principal amount: 325000 Available Terms and Rates Term Rate 1 Year 3.59% 2 Year 3.74% 3 Year 2.96% 5 Year 3.29% 10 Year 6.10% Enter mortgage term in years (1, 2, 3, 5, 10): 4 4 is an invalid term, please re-enter. Enter mortgage term (1, 2, 3, 5, 10): 1 Enter mortgage amortization period (5, 10, 15, 20, 25): 30 30 is an invalid amortization period Enter mortgage amortization period (5, 10, 15, 20, 25): 25 Monthly payment amount is: $1638.11 Payment schedule for Harvey Wallbanger Produced Wed Apr 29 17:08:10 MDT 2020 Property address: 123 Main St Amortization Period (in years): 25 Term of Mortgage (in years): 1 Interest Rate: 3.59% Monthly Payment Schedule Month Open Bal Payment Princ Interest Closing Bal 1 325000.00 1638.11 673.01 965.10 324326.99 2 324326.99 1638.11 675.01 963.10 323651.99 3 323651.99 1638.11 677.01 961.10 322974.98 4 322974.98 1638.11 679.02 959.09 322295.96 5 322295.96 1638.11 681.04 957.07 321614.92 6 321614.92 1638.11 683.06 955.05 320931.86 7 320931.86 1638.11 685.09 953.02 320246.77 8 320246.77 1638.11 687.12 950.98 319559.65 9 319559.65 1638.11 689.16 948.94 318870.49 10 318870.49 1638.11 691.21 946.90 318179.28 11 318179.28 1638.11 693.26 944.84 317486.02 12 317486.02 1638.11 695.32 942.79 316790.70 ================================================================================ Ttls 8209.30 11447.97 Submission – Source Code with Sample run Grading and Software Releases You should approach this problem incrementally. Building additional functionality onto each new release. Only submit the most recent working release. Here are the recommended releases: 1. Program inputs all values and figures out
Oct 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here