Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Credit Card Debt The True Cost of Paying Minimum Payment Write a C++ program to output the payment schedule for amount owed when each month

Credit Card Debt

The True Cost of Paying Minimum Payment

Write a C++ program to output the payment schedule for amount owed when each month nothing more is charged to the account but only the minimum payment is paid. The output stops when the balance is fully paid (i.e. no longer > 0).

Input:

Data input must be done in a separate function.

Input the following: credit card balance, interest rate on your credit card, and percent of minimum payment. Test data: 624, 24, 4

Data must be read from a file called lab6.txt, which you must create first and format it the way you see fit. You can use a text editor; don't need to write a C++ program to create that.

Calculate:

This function must be called from main() from within the loop which you should develop for the high level structure.

For each month, calculate the amount of interest to be paid that month(adding this into balance before calculating minimum payment), total of interest paid, amount of minimum payment due for the month, and updating new balance.

If the minimum payment is less than $15.00 then set it at $15.00

Output:

This function must be called from main() from within the loop.

There needs to be a separate function to output the table heading. Also output the information input from the file.

And, there needs to be a separate function to output month(count), balance at the end of the month, interest paid that month, minimum payment for that month, and the sum of amount of interest paid so far(accumulated).

All output must be redirected to a file.

For background information, see: http://www.bankrate.com/calculators/managing-debt/minimum-payment-calculator.aspx

Sample output:

Balance Owing: $ 624.00

APR as % 24

Percent for minimum payment as % 4

------------------------------------------------------

Month Balance Interest this month Minimum Sum of interest paid
1 611.02 12.48 25.46 12.48
2 598.31 12.22 24.93 24.70
3 585.87 11.97 24.41 36.67
4 573.68 11.72 23.90 48.38
...
57 31.80 0.92 15.00 388.14
58 17.44 0.64 15.00 388.78
59 2.79 0.35 15.00 389.13
60 0.00 0.06 2.84 389.18

Checkpoints

Absolutely No arrays

Use reference variables when and only when you must

Must check for file existence for input file when it is opened and close the file when the output process is done

Include file header w/ info about the program and you, as the developer

Headers and comments for main() and each function (read Module 3D under "Functions")

You must have sufficient, meaningful comments in main() and all functions. Grading on your work will weigh more than ever on:

i. the quality and quantity of your comments;

ii. architecture and structural segmentation of your code;

iii. nomenclature;

iv. overall readability

Output must be formatted as shown above with decimal points lined up. Output must go to a file and that file must be uploaded as .txt. No cout object should be left in this function, or at least they should be commented out if they were for debugging and testing.

Submit both the .cpp and .txt files, including the input data file.

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_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Knowledge of digital marketing and social media

Answered: 1 week ago

Question

3. Job rotation is used for all levels and types of employees.

Answered: 1 week ago