Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write in Java not C Program 1 Retirement Savings A 401(k) plan is a type of tax-qualified account for people to save for retirement.

Please write in Java not C

Program 1 Retirement Savings A 401(k) plan is a type of tax-qualified account for people to save for retirement. Employees typically have part of their pre-tax pay check deposited into such an account and employers may match a certain amount of those contributions. As of 2018, there is a maximum annual contribution limit of $18,500. The money contributed to a 401(k) account may be invested in many different ways. While the account may grow tax free, it is not immune to inflation. To account for inflation, you can use the following formula which is the inflation-adjusted rate of return. 1 + rate of return 1 + inflation rate 1 Write a program that produces an amortization table for a 401(k) account. Your program will read the following inputs as command line arguments. An initial starting balance A monthly contribution amount (well assume its the same over the life of the savings plan) An (average) annual rate of return (on the scale [0, 1]) An (average) annual rate of inflation (on the scale [0, 1]) A number of years until retirement Your program will then compute a monthly savings table detailing the (inflation-adjusted) interest earned each month, contribution, and new balance. To get the monthly rate, simply divide by 12. Each month, interest is applied to the balance at this rate (prior to the monthly deposit) and the monthly contribution is added. Thus, the earnings compound month to month. Be sure to round appropriately, to the nearest cent so that rounding errors do not compound. Your program will need to validate the input and quit with an error message on any potential bad input(s). For inputs 10000 500 0.09 0.012 10 your output should look something like the following: If using Java, your program should be runnable from the command line as: java Retire 10000 500 0.09 0.012 10 and output the results to the standard output.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

Understand why customers are loyal to a particular service firm.

Answered: 1 week ago