Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the exact correct program in java. Please include output as well and some brief steps. I will make sure to give thumbs up

Please write the exact correct program in java. Please include output as well and some brief steps. I will make sure to give thumbs up !
image text in transcribed
image text in transcribed
Problem Description: Write a program in Java that reads in: (i) investment amount, (ii) annual interest rate, and (iii) number of years from the keyboard and calculates the future investment value using the following formulae: numberOfMonths=numberOfYears12monthlyInterestRate=1200annuallnterestRatelnPercentfuturelnvestmentValue=investmentAmount(1+monthlyInterestRate)numberofmonths Sample Run: Enter investment amount: 1000 Enter annual interest rate in percentage points (c.g., 2.25 for 2.25% ): 2.25 Enter the number of years: 2 The value of $1000.0 after 2 years is $1045.9837866210664 Hints: 1. Import the Scanner class from the java.util package to read the three input variables. 2. Declare variables as "double" or "int" appropriately. 3. Use the Math.pow (a,b) function to compute ab. 4. Use the sample run in the instructions to test your program to make sure it is correct before you submit. Deliverables: Hints: 1. Import the Scanner class from the java.util package to read the three input variables. 2. Declare variables as "double" or "int" appropriately. 3. Use the Math.pow (a,b) function to compute ab. 4. Use the sample run in the instructions to test your program to make sure it is correct before you submit. Deliverables: Your.java file including: 1. A sample run at the top with investment amount of $2023.50, annual interest rate of 5.5%, and 4 years. The four lines of the output (similar to those shown in the sample run above) should be inserted as a comment on the top of the Java code (before the import and class statements). (2 points) 2. Your code with other appropriate comments. (Code: 6 points, Comments: 2 points)

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

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

1. What might have led to the misinformation?

Answered: 1 week ago

Question

2. How will you handle the situation?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago