Your program calculates the interest and print the details to the monitor, refer to the sample...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
If you have any problem with the code feel free to comment Program import javaioFile import javaioIOException import javautilScanner public class Test ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Change the equation x+y=49 from Cartesian coordinates to cylindrical coordinates. (Simplify your answer)
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Top executive officers of Preston Company, a merchandising firm, are preparing the next years budget. The controller has provided everyone with the current years projected income statement. Current...
-
The diameter of a circle is twice its radius, as shown in the Exercise 91 illustration. If the radius of a circle is 7/20 of a foot, what is its diameter?
-
Francis Restaurant is opening for business in a new shopping center. Roger Lee, the owner, is preparing a sales budget for the next three months. After consulting friends in the same business, Mr....
-
Fill in the Blank. The velocity with which a representative point moves along a trajectory is called the ___________ velocity.
-
Multiple Choice Questions, 1. After massive promotion of Justin Bieber's latest music album, the producers reacted by raising prices for his albums. This implies that promotion expenditures made the...
-
If a manager has complete power over a decision, there is nothing stopping them from incorporating personal bias into his or her decision-making process. Would you agree with this statement? Why?...
-
Derive and solve the equation of motion for the mass m in terms of the variable x for the system shown. Neglect the mass of the lever AOC and assume small oscillations. C k2 k1 ww TxB = bo cos ot A a
-
The Wine Press is considering a project which has an initial cash requirement of $187,400. The project will yield cash flows of $2,832 monthly for 84 months. What is the annual rate of return on this...
-
If you were an executive at a company that had a pervasive yet problematic culture, what steps would you take to change it? Using Google Scholar or your university librarys access to EBSCO,...
-
Can the voltage regulation, which is proportional to \(\left(V_{\mathrm{RNL}}-V_{\mathrm{RFL}} ight)\) , be negative? (a) Yes (b) No
-
Consider the situation described in Table 3.4 under the legal rule that the victims (the citizens) are entitled under the damages remedy. Describe how the Coasian bargaining process would proceed and...
-
Under capitalism, socialism, and communism, most productive resources are owned respectively by private individuals, the government, and a single political party. Which of these political- economic...
-
If you are unaware of the general views and initiatives of your nation's leader, study his or her website to see what the leader is up to. Make a list of what you perceive as the leader's top five...
-
At the end of the fiscal year, an adjusting entry was made for accrued salaries of $500. On the first day of the new year the adjusting entry was reversed. The salaries for one week, $1,250, were...
-
Periwinkle Company is a multinational organization. Its Parts Division is located in Lavender Land, while its Assembly Division is located in North Orchid. During the current year Periwinkle Companys...
-
Bea Jones (age 32) moved from Texas to Florida in December 2011. She lives at 654 Ocean Way, Gulfport, FL 33707. Bea's Social Security number is 466-78-7359 and she is single. Her earnings and income...
-
William sold Section 1245 property for $25,000 in 2012. The property cost $35,000 when it was purchased 5 years ago. The depreciation claimed on the property was $16,000. a. Calculate the adjusted...
-
Van makes an investment in a partnership in 2012. Van's capital contributions to the partnership consisted of $30,000 cash and a building with an adjusted basis of$70,000, subject to a nonrecourse...
-
As the marketing manager for Independent Packaging Pty Ltd, you have asked the accountant what it costs to make the Container2000 model because you want to set a price for the container. A similar...
-
Incomplete information concerning the financial performance of two manufacturing companies is presented below. Required Determine the answers to (a) to(f) for the two companies. Work in process,...
-
Smart Manufacturing Systems Pty Ltd uses a periodic inventory system and closes its accounts on 30 June each year. The companys closing entries made on 30 June 2025 were as shown below. Required (a)...
Study smarter with the SolutionInn App