Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVASCRIPT ONLY, NOT JAVA!!!!!! Design and implement a program that will allow us to determine the length of time needed to pay off a credit

JAVASCRIPT ONLY, NOT JAVA!!!!!!

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:

displayWelcome

This function should display the welcome message to the user explaining what the program does.

calculateMinimumPayment

This function calculates the minimum payment. It should take balance and minimum payment 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!

displayPayments

This function displays the actual payment schedule. It should take the balance and monthly interest rate as arguments.

Use the 1500, 18% and 2% literal values below.

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 ($20 min)

Your minimum payment would be $ 30.00

PAYOFF SCHEDULE

_________________

Year Balance Payment Number Interest Paid Minimum Payment
1 $ 1,492.50 1 $ 22.50 $ 30.00
$ 1,485.04 2 $ 44.89 $ 29.85
$ 1,477.61 3 $ 67.16 $ 29.70
$ 1,470.22 4 $ 89.33 $ 29.55
$ 1,462.87 5 $ 111.38 $ 29.40
$ 1,455.56 6 $ 133.32 $ 29.26
$ 1,448.28 7 $ 155.16 $ 29.11
$ 1,441.04 8 $ 176.88 $ 28.97
$ 1,433.83 9 $ 198.50 $ 28.82
$ 1,426.67 10 $ 220.00 $ 28.68
$ 1,419.53 11 $ 241.40 $ 28.53
$ 1,412.43 12 $ 262.70 $ 28.39
2 $ 1,405.37 13 $ 283.88 $ 28.25
$ 1,398.35 14 $ 304.96 $ 28.11
$ 1,391.35 15 $ 325.94 $ 27.97
$ 1,384.40 16 $ 346.81 $ 27.83
$ 1,377.47 17 $ 367.58 $ 27.69
$ 1,370.59 18 $ 388.24 $ 27.55
$ 1,363.73 19 $ 408.80 $ 27.41
$ 1,356.92 20 $ 429.25 $ 27.27
$ 1,350.13 21 $ 449.61 $ 27.14
$ 1,343.38 22 $ 469.86 $ 27.00
$ 1,336.66 23 $ 490.01 $ 26.87
$ 1,329.98 24 $ 510.06 $ 26.73

Cont.

13 $ 467.52 145 $ 2,249.73 $ 20.00
$ 454.54 146 $ 2,256.74 $ 20.00
$ 441.35 147 $ 2,263.56 $ 20.00
$ 427.98 148 $ 2,270.18 $ 20.00
$ 414.39 149 $ 2,276.60 $ 20.00
$ 400.61 150 $ 2,282.81 $ 20.00
$ 386.62 151 $ 2,288.82 $ 20.00
$ 372.42 152 $ 2,294.62 $ 20.00
$ 358.01 153 $ 2,300.21 $ 20.00
$ 343.38 154 $ 2,305.58 $ 20.00
$ 328.53 155 $ 2,310.73 $ 20.00
$ 313.45 156 $ 2,315.66 $ 20.00
14 $ 298.16 157 $ 2,320.36 $ 20.00
$ 282.63 158 $ 2,324.83 $ 20.00
$ 266.87 159 $ 2,329.07 $ 20.00
$ 250.87 160 $ 2,333.07 $ 20.00
$ 234.63 161 $ 2,336.84 $ 20.00
$ 218.15 162 $ 2,340.36 $ 20.00
$ 201.43 163 $ 2,343.63 $ 20.00
$ 184.45 164 $ 2,346.65 $ 20.00
$ 167.21 165 $ 2,349.42 $ 20.00
$ 149.72 166 $ 2,351.92 $ 20.00
$ 131.97 167 $ 2,354.17 $ 20.00
$ 113.95 168 $ 2,356.15 $ 20.00
15 $ 95.66 169 $ 2,357.86 $ 20.00
$ 77.09 170 $ 2,359.29 $ 20.00
$ 58.25 171 $ 2,360.45 $ 20.00
$ 39.12 172 $ 2,361.32 $ 20.00
$ 19.71 173 $ 2,361.91 $ 20.00
$ - 174 $ 2,362.21 $ 19.71

Save your program in a file named credit.js and save it in a folder called Assignment_3. Zip that up and rename it to lastName_Assig#_Attempt#.zip ex: corbin_assig2_Attempt1.zip Zip that folder and submit in the dropbox.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago