Write a Java program that lets the user enter the loan amount and loan period in number of years and
displays the monthly and total payments for each annual interest rate starting from 3.5% to 8% with an
increment of 0.25%. Below are the formulas that can be used to calculate monthlyPayment & totalPayment.
factor = 1/ 1+(annualInterestRate/1200)
monthlyPayment = loanAmount * (1 - factor) / (factor * (1 - Math.pow(factor, numOfYears * 12)))
totalPayment = monthlyPayment * 12 * numOfYears;