Computes and return the total interest

Assignment Help Business Management
Reference no: EM132294702

Using Java, compile a method named invest that computes and return the total interest earned on a financial investment. Once per year, the bank pays interest to the investor at a given fixed rate. As the investment earns interest, that interest is added to the investment and therefore the interest begins earning interest of its own ("compounding").

Your method should accept three parameters in the main function: the initial amount of the investment in dollars (as a real number such as 1500.0 for $1,500.00), the yearly interest rate (as a real number such as 3.5 for 3.5% interest) and the number of years for which to invest (as an integer such as 6 for 6 years) and then returns the total interest earned (as a real number such as 35.60 for $35.60).

Your method should print the value of the investment after each year. Upon return, your program should print cumulative interest earned over all years in the main function. For example, an investment of $100.00 at 10% interest for 5 years would lead to this call:

// $100.00 at 10% interest for 5 years

double totalInterest = invest(100.00, 10.0, 5);

The call would produce the following console output. Dollar amounts print with 2 digits after the decimal.

Notice that we are not simply adding 10% of $100.00 (or $10.00) each year; that would lead to $50 of total interest earned. The first year adds 10% of $100.00, but the second year adds 10% of $110.00, or $11.00, leading to a total of $121.00. The third year adds 10% of $121.00, or $12.10, leading to a total of $133.10 and so on. The interest is cumulative. You may assume that all parameter values passed are non-negative.

Reference no: EM132294702

Questions Cloud

Discuss some issues that may arise : Why is an update/patch process crucial for any organization to have and follow?
What is a spreadsheet : What is a spreadsheet. How do we use spreadsheets as data storage and data analysis tools? How do you use spreadsheets to manage daily administrative tasks.
What are some of the risks of end-user : What are some of the risks of end-user development of IT applications?
Who are the typical users : Select one Information System and inform what you found out about the system.
Computes and return the total interest : Using Java, compile a method named invest that computes and return the total interest earned on a financial investment. Once per year, the bank pays
Apply effective testing techniques to software systems : Develop a good understanding of professional industry standards for software testing - appreciate the value of various processes and methods used in industry
Impact selection of a file management system : How does the OS used and the specific applications on the system impact selection of a file management system?
What is a pointer : What is a pointer? Provide an example to support your definition
Describe the concept of polymorphism : Describe the concept of polymorphism. Provide an example to illustrate your point. The example may be pseudocode

Reviews

Write a Review

Business Management Questions & Answers

  Evaluate the internal and external environments

Evaluate the internal and external environments of your selected company using an environmental scan.

  Alternative strategy for corben company

An alternative strategy for Corben Inc. is to cancel the introduction of Zaturn and instead to spend the $40 million (on an annual basis) to promote Crunz. This action is expected to increase the sales for Crunz by 50%. Both brands (Cruz and Zatur..

  Organizational structure-culture-power and politics

Q1. - Analyze the influence of organizational structure on behavior. Q2. - Analyze the influence of organizational culture on behavior.

  Confidence interval of true variance and standard deviation

A random sample of 15 snow mobiles was selected, and the lifetime (in months) of the batteries was measured. The variance of the sample was 8.6. Find the 90% confidence interval of the true variance and standard deviation.

  Main concerns that mnc

1) What are two main concerns that MNCs should evaluate when doing business in Russia? 2) How can MNCs protect themselves from government action? 3) What proactive political strategies might help protect MNCs from future changes in the political envi..

  Steps with explanation for me to understand

Write a C++ program that asks the user to type 10 integers of an array. the program must: (Steps with explanation for me to understand and also a screen shot photo)

  Workforce crisis of 2030 ted talk rainer strack

The Workforce Crisis of 2030 ted talk Rainer Strack List 2-3 concepts you found interesting and explain how you can apply this information in your professional

  Effects of imperfect information also asymmetric information

Illustrate economic differences are there between the effects of imperfect information also asymmetric information.

  Appropriate value for the decrypting keys

Find the appropriate value for the decrypting keys n and d in the RSA public key cryptology system based system based on the primes p = 7 and q = 19 and the encryption key e = 5

  Project charter checklist for expert tips

At a project's initiation, management and stakeholders authorize and approve the work to be done. This process often takes the form of a project charter, which can be either an informal document or a formal contract. In both cases, key stakeholder..

  Elucidate how do international medical staffing

Elucidate how do the international medical staffing industries which view customer complaints as nothing more than a pain in their side contribute to customer discount industry action formation by their HCPs?

  Selected global business venture

Prepare a 1,400- to -word paper in which you conduct a political, legal, cultural, financial, and ethical risk analysis for your selected global business ventur

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd