P1 – Loan Payment Schedule Main Street Bank is offering an annual…

Question P1 – Loan Payment Schedule Main Street Bank is offering an annual… P1 – Loan Payment ScheduleMain Street Bank is offering an annual interest rate discount based on the client’s credit score. The discount for each credit score level is provided in the table below. The lowest credit score is 300 while the highest credit score is 850. For example, the new interest rate for a client with a credit score of 755 and a current interest rate of 4.25% would be 4.25 – 0.75 = 3.50% interest rate Credit ScoreRatingInterest Rate Discount300 – 579Very Poor0.00580 – 669Fair0.25670 – 739Good0.50740 – 799Very Good0.75800 – 850Exceptional1.00 Use modular programming conceptsCreate a program that includes a WHILE loop to generate a payment schedule for loans that are paid in equal monthly paymentsInput the loan number and retrieve required loan account from MS_LOANS tableOutput is shown belowMonthly interest is calculated by dividing the yearly interest rate by 12 to get a monthly interest rate. Then, divide the monthly interest rate by 100 to get a percent monthly interest rateBalance is previous balance plus monthly interest minus monthly paymentMake sure to handle the final paymentCalculate the number of years and months to pay loanInclude exception handling including the WHEN OTHERS exception handler to trap all errors Computer Science Engineering & Technology MYSQL CSD 4204 Share QuestionEmailCopy link Comments (0)