IT210 Program Assignment 3 Credit Card Interest Calculator solution




5/5 - (6 votes)

Write a C++ program that will read customer information from an input text file and
calculate the interest on unpaid credit card balances of one or more customers’ of a
bank using the average daily balance. Results will be output to the monitor and text
Program Input
Each record in the input text file shall consist of:
 Customer’s first and last name ;
 Credit card number
 Balance shown in the bill (netBalance)
 Payment made (payment)
 Days in the billing cycle (d1)
 Number of days payment made before billing cycle (d2)
Calculate the average daily balance based on the equation given below:
averageDailyBalance = (netBalance * d1 – paynment * d2)/d1
interest = averageDailyBalance *APR/(100*12)
where APR depends on the average daily balance as shown below
averageDailyBalance <$100 APR = 5% averageDailyBalance between $100 and $1000 APR = 10% averageDailyBalance >$1000 APR = 15%
Your program must read from the input text file provided to you and output results to both
the monitor and an output text file. Your program’s output must be identical to the
provided screenshots, and output text file.
You may modify your previous assignment to achieve the objective.
Submission Requirements:
Submission requirements are listed under Program Submission Requirements. You are
required to include a flow chart, a program narrative which describes the objective and
procedures, input screenshots, source code with comments (font size 12, word wrap and
line numbers in margin), output screenshots with white background and black text, with
required files on the flash drive
To copy an output window to Word:
1. Select the output window, and then press ALT + PRINT SCREEN.
2. Open Word.
3. Type the descriptive header.
4. Paste (CTRL + V) the current contents of the clipboard (the output window
screenshot) into the document.
5. Print two copies of the screenshots document. Place one copy in the input section and
the other in the output section