Program to accept account balance and calculate the interest


Question 1) Write a program which accepts account balance and name of account holder as input and it calculates the interest (balance*rate), total amount (balance + interest) and minimum payment for revolving credit line. The rate schedules are as follows:

a) For first $1000 balance the rate is 1.5%

b) For next $3000 balance, the rate is 2%, and

c) 3% on rest of the balance.

The minimum payment is as follows:

d) The total amount due if it is $10 or less;

e) Otherwise, it is $10 or 10% of the total amount (whichever is larger).

Your program must include loop, functions, and arrays which lets the user repeat this calculation until user is done.

1) Write the function Read_data() to read the data from keyboard

2) Write the function Get_total() to compute interest and find total amount due.

3) Write the function Payment(), which would return minimum payment due.

4) Write the function Display() which would create an output file and display name, account balance, total amount, and payment as shown below:

Name Balance Total Amount Payment
John Doe 5600.00 5723.00 572.3

Hints: The interest ($123.00) is computed the following way:

a) For first $1000.00, the interest is $15.00 (rate is 1.5%)

b) Next $3000.00, the interest is $60.00 (rate is 2%)

c) For the rest of the amount ($1600), the interest is $48.00 (rate is 3%)

5) Write a function SortName() to sort the total in ascending order and display the arrays

6) Write a function SearchName() to search the array by total and display the outcome.

7) Run your program for the following data:

John Doe 6500
Mary Doe 230
Juan Lopez 50
Larry Smith 7
Nancy Garza 30

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Program to accept account balance and calculate the interest
Reference No:- TGS04573

Expected delivery within 24 Hours