Interest earned on a financial investment

Assignment Help Business Management
Reference no: EM132290076

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: EM132290076

Questions Cloud

How many of each would she buy to maximize her utility : Suppose there is a sale on prints, reducing the price from $20 to $10. If Kate had $140 to spend on plants and prints, how many of each would she buy to maximiz
Theories of Creativity and Creative Problem Solving Process : Theories of Creativity and Creative Problem Solving Process
Single-level dense secondary index for our file : How many index blocks will be needed for our single-level dense secondary index for our file. (Also assume 80% fill on the index blocks.)
Major problems encountered by prison or jail employees : What are some of the major problems encountered by prison or jail employees? And how are these similar to other positions in the criminal justice system?
Interest earned on a financial investment : Using Java, compile a method named invest that computes and return the total interest earned on a financial investment.
Compute the Amplitude Frequency and Time period : Compute the amplitude, frequency, time period and phase for each of the following equations and also draw their respective waveforms
Knapsack problem using branch and bound algorithms : Can you please explain about how to solve the Knapsack problem using Branch and Bound Algorithms?
System 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?
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

  Describe the term system give an example of a business

Describe the term system. Give an example of a business system as well as create a context diagram to show its boundary, environment, inputs and outputs.

  Consider the nonverbal messages surrounding the message

Look at a business letter that you have received at work or at home. Consider the nonverbal messages surrounding the message. Do they support the verbal message or not? If not, what could the sender have done to ensure that the verbal and nonverba..

  Reflect on the major takeaways

In this week's Journal, reflect on the major takeaways from this class that can make you an effective leader.

  What does diminishing marginal utility mean

What does diminishing marginal utility mean?

  Determining the recursive method to check

A palindrome is a string that reads the same both forward and backward. For example, the string ‘‘madam'' is a palindrome. Write a program that uses a recursive method to check whether a string is a palindrome.

  What are equitable adjustments and value engineering

What are Equitable Adjustments and Value Engineering in regards to Federal Contracting and Federal Aquisition Regulation (FAR)?

  Organizations-implementing plans they create

Functional tactics, and action items are included in many implementation plans, why do some organizations have a difficult time reflecting the plan they create?

  Analyze and discuss the central issues faced by vodafone

Analyze and discuss the central issue(s) faced by Vodafone, including the contributing management and technological factors; Explain why ERP was a necessary information system solution to address the organization's issues;

  Describe the main components of contemporary business

Describe the main components of contemporary business. Describe the focus of nonprofit organizations. Explain the five elements in the business environment.

  Describe any potential challenges you think could be present

Describe any potential challenges you think could be present in the design of your model. Please comment on the models presented by other learners to identify strengths and potential challenges of their designs.

  Two products with the same cost

Consider two products with the same cost but different margins. Which product should have a higher level of product availability? Why? The paper must include a comprehensive response to the scenario.

  How are customer results as well as investor results

How are customer results as well as investor results synergistic and how may they conflict with one another?

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