Reference no: EM133594457
Question: How would you build an application that calculates how long it will take to become a millionaire by investing in the stock market. Your program will need the following input values:
(a) amount of money to invest each month (investment),
(b) estimated annual return/interest rate (rate), and
(c) how much money you think you'll need to retire comfortably (target). Read the values from the user and output an amortization sheet showing the monthly progress toward your retirement goal. Here are the steps that you will need to follow:
• Assume your beginning balance is ZERO - you've not started saving yet.
• Compute the monthly interest rate by dividing the annual rate of return by 12, then divide by 100 to convert it to a double value in the range of .000 - .999.
• Compute the earnings for the month by multiplying the beginning balance for the month by the monthly interest rate.
• Compute the ending balance for the month by computing the sum of the beginning balance, monthly contribution, and interest earned.
• Output a line that indicates the month, beginning balance, monthly contribution, interest earned, and ending balance.
• Repeat these steps until the ending balance is greater than or equivalent to your retirement target. Additionally, you should compute the total monthly contributions and investment earnings and output them after the amortization table is displayed.