subject

Design and implement a program that will allow us to determine the length of time needed to pay off a credit card balance, as well as the total interest paid. The program must implement the following functions:1. displayWelcome This function should display the welcome message to the user explaining what the program does.2. calculateMinimumPayment This function calculates the minimum payment. It should take balance and interest rate as arguments and return the minimum payment. So the value you display for minimum payment is the value you get from this method. Do not use a literal hardcoded value when you display the minimum payment!3. generatePaymentID: This should be a closure function that generates a new payment id for the payment. The function should remember the previous id and the new generated id should be the old one plus 1. Make the initial id 1.4. processPaymentSchedule This function displays the actual payment schedule. It should take the balance, monthly interest rate and minimum payment as arguments. Use the 1500, 18% and 2% literal values below. Each time you calculate a new payment line, create an object literal with properties for the Year, Balance, Payment Id, and InterestPaid. Pass this object literal to the displayPayment function. The paymentId should be generated by the generatePaymentID function each time. See the sample execution below:This program will determine the time to pay off a credit card and the interest paid based on the current balance, the interest rate, and the monthly payments made. Balance on your credit card: 1500 Interest Rate: 18 Assuming a minimum payment of 2% of the balance ($30 min) Your minimum payment would be $ 30.00PAYOFF SCHEDULEYear Balance Payment Num Interest Paid1 1,492.50 1 22.501,484.89 2 44.891,477.16 3 67.161,469.32 4 89.32. . .. . .7 517.51 73 1,207.51495.28 74 1,215.28472.70 75 1,222.70449.79 76 1,229.79. . .. . .8 227.51 85 1,277.51200.92 86 1,280.92173.94 87 1,283.94146.55 88 1,286.55118.74 89 1,288.7490.53 90 1,290.5361.88 91 1,291.8832.81 92 1,292.813.30 93 1,293.300.00 94 1,293.35 displayPayment This function should take the payment object literal and display it on the console. See the output example in part 4.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Select all that apply. which of the following are proofreading options included in microsoft word? spell check find replace grammar check formatting check
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
You know the right answer?
Design and implement a program that will allow us to determine the length of time needed to pay off...
Questions
question
History, 13.11.2020 17:00
question
Computers and Technology, 13.11.2020 17:00
Questions on the website: 13722367