Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program calculates the interest and print the details to the monitor, refer to the sample below. Terminate the program when the end of

Your program calculates the interest and print the details to the monitor, refer to the sample below. student submitted image, transcription available belowstudent submitted image, transcription available below


 
 

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 >= 5 years Less than 5 and >=4 years Less than 4 and >=3 years Less than 3 and >=2 years Less than 2 and >=1 years. Less than 1 year The program will use the entered code to determine number of times compound interest is calculated and paid per year. Code Interest Rate 4.5% 4% 3.5% 2.5% 28 1.5% Number of times calculated 4 2 1 D 12 E 365 Compute the interest using the following formula: A B C A = P(1+r/n) ^nt P = principal amount (the initial amount you borrow or deposit) I = annual rate of interest (as a decimal) = 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 Ac Go 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, r = 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). 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 A Nancy Brown 6780 10 a Sample output 1 Program Number 1. Joe Blake Enter File name: assign3.txt Computer Science 3 Name Years Joseph Kardian III 6 Nancy Brown 10 Sample output 2 Sample output 3 Thank you for using interest calculation program. Enter File name: abc.txt Program Number 1 Joe Blake Computer Science 3 $6780.00 Could not open file. Program terminated. Program Number 1 Joe Blake Deposit Amount $1500.00 Computer Science 3 Enter File name: blank.txt Interest Earned Total $461.99 $3835.32 $1961.99 $10615.32 Have a nice day. There was no data in the file. Program terminated.

Step by Step Solution

3.49 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

If you have any problem with the code feel free to comment Program import javaioFile import javaioIOException import javautilScanner public class Test ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

describe several successful positive work interventions.

Answered: 1 week ago