Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 1: Calculating time taken to pay off credit card Problem. Create a program to calculate how many months it will take to pay off

Assignment 1: Calculating time taken to pay off credit card Problem. Create a program to calculate how many months it will take to pay off a credit card given current credit card balance, annual percentage rate, the monthly payment amount. Add 10% to the monthly payment and recalculate the number of months. Report the results in a table.Input: Prompt forthe clients namethe current credit card balancethe Annual Percentage Rate (APR) the amount of money you can be paid monthly.Formula: n = log(1 (Ai/P))/log(1 + i) Where,n = Number of Months to payoff credit cardA = Amount on credit cardi = Monthly Rate (APR / 12) P = Monthly Payment AmountConstraints: Enter the APR as an integer. A 22% interest rate would be entered as 22. Have the program convert this to the correct rate: .22. Display the payoff months as a whole number - fractional months dont make sense. Use the literal MONTHS_IN_YEAR rather than 12 in formulas requiring the number of months (if you need any). Keep the Input, Processing, and Output sections of your code separate, use modular hierarchical design. Design functions to prompt and read client name, prompt and read API, prompt and read monthly payments, prompt and read current credit card balance, calculate the number of months (using helper functions as needed) and display the results in a tabulated form.Use one of the C++ libraries for the log() function Output: Sample RunDiscussion. The hardest part of this assignment is getting the formula right. Take your time and break it up into parts - dont try to fit the formula on one line. This will make it easier to debug as well. This program does not need loops or decisions. No input validation.You will need to include the iomanip library for output formatting. Use three decimal places of precision.You will also need the strings library.You will need to use basic functions so make sure to review the C++ programming guide for CISP301 review on this topic and refer Chapter 6 of the textbook and revise Functions material on Zybook.You will need to submit your design document (see the sample programming assignment document) and submit your code..

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions