1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bekas [8.4K]
3 years ago
5

This assignment is to read from an input file and process the data for a group of people. Your program calculates the interest a

nd 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.
Computers and Technology
1 answer:
nignag [31]3 years ago
7 0

Answer:

the way of for 3

Explanation:

You might be interested in
To create a chart you need to select at least ___ in a range of data
Blababa [14]

Answer:

2 by 2 squares of data

Explanation:

If you have less than that it is not a chart.

5 0
3 years ago
The insert options button lists formatting options. true or false.
dezoksy [38]
It's true and false depending on what format you  are using.
8 0
2 years ago
Python is an example of a low level programming language true or false?​
alekssr [168]
False- python is an example of a high level language. Other high levels are c++, PHP, and Java
6 0
3 years ago
What is network management?
melamori03 [73]
Network management is  a broad range of  functions including activities, methods, procedures and the  use of  tools to administrate,operate,and  reliably maintain computer network system.  <span />
3 0
3 years ago
How to call a variable as a tag in react native.
Pepsi [2]

Explanation:

There is no need of adding template strings inside a <Text> component for adding strings in react-native. You can just use simple text and for variables, you can wrap it with curly braces

6 0
2 years ago
Other questions:
  • What kind of game was Pole Position?
    14·1 answer
  • You view a portion of a document on the screen through a ____.
    6·1 answer
  • For your new sporting goods store, you originally planned to only sell Nike shoes. Therefore, you only had enough shoe displays
    11·2 answers
  • What is the problem with the code snippet below? public class Test { public static void main(String[] args) { System.out.println
    6·1 answer
  • Mac and PC .Which one is better for professional users, and why
    6·1 answer
  • Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT
    12·1 answer
  • Write code which takes two inputs from the user, a number of sides followed by a side length, then creates a regular polygon wit
    10·2 answers
  • Procedural programs specify instructions that a processor must execute to perform computations. These programs sometimes consist
    11·1 answer
  • Give me two reasons why return statements are used in code.
    10·2 answers
  • 12. Why is it so important to pay attention to your digital reputation?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!