My Credit Card Company has a file that called BeginningBalan
My Credit Card Company has a file that called “BeginningBalance.dat” which contains the following information: • Customer number->integer • Beginning Balance->double • Purchases->double • Payments->double
The company charges 1% of the beginning balance for finance charges. Write a Java program that does the following: • Read in the file, calculates the finance charge per customer • Display all information to the monitor including finance charge and outstanding balance • Creates an output file called “NewBalance.dat” that contains customer number and new balance.
Solution
Hi,
Below is a java program based on your requirements:
Sample Input File is as under:
Please note the following points while creatiing input file
Sample Console Output is as under
Customer No
123
Customer No
1,000,000.00
Purchases
Furniture --> 20,000.23
Computer Hardware --> 45,000.00
Payments
Electricity --> 6,000.00
Employee Wages --> 30,000.00
Finance Charges
10,000.00
Outstanding Balance
888,999.77
------------------
Customer No
456
Customer No
200,000.00
Purchases
Furniture --> 30,000.00
Computer Hardware --> 4,000.56
Payments
Electricity --> 26,000.00
Employee Wages --> 90,000.00
Finance Charges
2,000.00
Outstanding Balance
47,999.44
------------------
Also, the file NewBalance.dat is created. A Sample of that file is as under:
Below is the java program for the same:

