subject

This assignment is to read from an input file and process the data for a group of people. Your program calculates the interest and print the details to the monitor, refer to the sample below. Terminate the program when the end of file is reached. In this assignment there is no need to verify data. Write a Java program that accepts an amount of money on deposit and a number of years it has been on deposit. It will determine the interest to be paid on the deposit based on the following schedule:
Time on Deposit Interest Rate
>= 5 years 4.5%
Less than 5 and >=4 years 4%
Less than 4 and >=3 years 3.5%
Less than 3 and >=2 years 2.5%
Less than 2 and >=1 years 2%
Less than 1 year 1.5%
The program will use the entered code to determine number of times compound interest is calculated and paid per year.
Code Number of times calculated
A 4
B 2
C 1
D 12
E 365
Compute the interest using the following formula:
A = P(1+ r/n)^nt
P = principal amount (the initial amount you borrow or deposit).
r = annual rate of interest (as a decimal).
t = number of years the amount is deposited or borrowed for.
A = amount of money accumulated after n years, including interest.
n = number of times the interest is compounded per year.
Example:
An amount of $1,500.00 is deposited in a bank paying an annual interest rate of 4.3%, compounded quarterly. What is the balance after 6 years?
Solution :
Using the compound interest formula, where P - 1500,- 4.3/100 - 0.043, n = 4, t - 6.
Therefore,
Calculation A - 1500 (1+0.043/4)(4.6)
So, the balance after 6 years is approximately $1,938.84.
Display the original deposit, the interest earned and the new Balance (with interested added to the deposit).
Display the original deposit, the interest earned and the new Balance (with interested added to the deposit).
Your program will prompt user for the name of input file and will process all the data in the file.
Refer to the samples below for input file and output format.
Requirements:
• Prompt user for file names.
• include minimum of 4 Methods, more is OK.
• Use good variable names.
Input file format:
Name
Amount deposited Years Code
Input file sample:
Joseph Cardian III
1800 6
Nancy Brown
6780 10
Sample output 1
Program Number 1
Joe Blake
Computer Science 3
Enter File name: assign3.txt
Name Years Deposit Amount Interest Earned Total
Joseph Kardian III 6 $1500.00 $461.99 $1961.99
Nancy Brown 10 $6780.00 $3835.32 $10615.32
Thank you for using interest calculation program. Have a nice day.
Sample output 2
Program Number 1
Joe Blake
Computer Science 3
Enter File name: abc. txt Could not open file. Program terminated.
Sample output 3
Program Number 1
Joe Blake
Computer Science 3
Enter File name: blank. txt
There was no data in the file. Program terminated.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:30
Ineed on my history if anyone can check out the last few questions i posted and i will be posting !
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
Answers: 1
You know the right answer?
This assignment is to read from an input file and process the data for a group of people. Your progr...
Questions
question
Mathematics, 08.05.2021 01:00
question
Mathematics, 08.05.2021 01:00
question
Mathematics, 08.05.2021 01:00
Questions on the website: 13722360