Question: i need this java code same out put as shown below attached Complete the following: Write an application that calculates the amount of money camed


Complete the following: Write an application that calculates the amount of money camed on an investment. Prompt the user to enter an investment amount, the number of years for the investment, and the interest rate. Display an error message if the user enters for any of these values, otherwise, display the total amount balance) for each year of the investment. Save the file as Investment.java: Specific instructions: Program must use 4 methods to accomplish the following: Prompt for and return the investment amount Prompt for and return the number of years Prompt for and return the interest rate Display the calculations Your output must resemble the sample below. Notice the formatting of the dollar amounts. You need to display 2 decimal places for all amounts, even for those with whole dollar amounts. os C:WWINDOWS\system32\cmd.exe . Enter investment amount 180 Enter number of years: 18 inter interest rate as a decinal) .BS Your Investast at S. 1: year $185.00 2 $110.25 ar 3 $115.2 $121.55 $127.63 year $131.01 year 7 $148.21 year & $147.25 year $155.13 18 $162.89 er S Enter Investment anunt: Invalid Investnent amount - please reenter Enter investment anunt 100 Enter ounder of yearut @ Years must be a positive whole number - please reenter Enter number of years: 3 Enter Interest rate as a decimal): 5 interest rate must be a positive decinal value - please reenter Enter interest rate as a decinal): .es Your Investment at 5.& 1st After year 1 $1858.8 meter year 2 $1182.50 after year 1 $1157.62 Compile the following Weider application that calculates the amount of money earned on an investment Prompt the user to enter an investment amount, the number of yours for the investment, and the interest rate Desplay in oror message if the user enters for any of these values, otherwise, display the total amount balance) for each year of the investment Save the flores investiranja Specific instructions Programmustused methods to accomplish the following Prompt for and return the investment amount . Prompt for and return the number of years Prompt for and return the interest rate - Display the calculations Your output must resemble the sample below Notice the formating of the dotar amounts You need to display 2 decimal places for all amounts oven for those with whole dottor amounts e C:\WINDOWS\system32cmd.exe Enter Investment amount 100 Enter anber of yearst 10 Enter Interest rate Casa de inalt Your Investment at 5. ist niter 186.00 119.25 rtei 116.26 ter var 4 $121.56 meter year $127.63 year 194.41 year 140.21 wear $147.75 $156,11 $162.89 Enter Investment anunt: Invalid Investment amount - please reenter Enter Investment anunt 1000 Enter number of yearste Years must be a positive whole number - please reenter C:\WINDOWS\system32\cmd.exe Liten ve en at: 190 Et number of yest":10 Enter interest rate as a devinal): .es Your Investment at 5.8x is: After year 1 $185.00 After year 2 $119.25 After year 3 $115.26 After year 4 $121.55 After year 5 $127.63 After year 6 $134.01 After year ? $140.71 After year 8 $147.25 After year 9 $155.13 After year 10 $162.89 Enter investment anount: 9 Invalid investment amount - please reenter Enter investment amount: 1000 Enter nunber of years: 8 Years nust be a positive whole number - please reenter Enter number of years: 3 Enter interest rate (as a decinal): 5 Interest rate must be a positive decimal value please reenter Enter interest rate (as a decinal): .85 Your Investment at 5.8% is: After year 1 $1958.00 After year 2 $1182.58 After year 3 $1157.62 RWSIAIS Complete the following Write an application that calculates the amount of money earned on an investment Prompt the user toontor on investment amount the number of years for the investment and the interes rate Display an error message if the user enters for any of those values, otherwise, display the total amount balance) for each year of the investment Save the lastnvestnant. Specific instructions Program must use 4 methods to accomplish the following . Prompt for and return the investment amount Prompt for and return the number of years Prompt for and return the interest rate Display the calculations Your output mustsembe the sample below Notice the formatting of the dollar amounts. You need to display 2 decimal places for all amounts oven for those with whole dollar amounts C:\WINDOWS\system32\cmd.exe Enter investment anunt: 182 Enter number of years: 10 Enter Interest rate as a decinal) .05 Your Investment at 5.0 isi year $10.00 $110.25 After year 2 $116.76 After year $121.55 After year $127.63 Reter year $134.21 Eter year? $140.21 heter year & $147.25 year 9 $155.13 after year 10 $162.89
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
