1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
photoshop1234 [79]
3 years ago
5

Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment v

alue using the following formula: futureInvestmentValue = investmentAmount * (1 + monthyInterestRate)numberOfYears*12. For example if you enter amount 1000, annual interest rate 3.25%, and number of years 1, the future investment value is 1032.98.NB: Please make sure to use the NumberFormat coding for currency to display your results. (Java Programming)

Computers and Technology
1 answer:
Vlada [557]3 years ago
3 0

Answer:

Following are the code to this question:

import java.util.*; //importing package for user input

public class Main //defining class

{

public static void main(String []ar) //defining main method

{

double investment_amount,interest_rate,future_investment_value; //defining double variables

int years; //defining integer variable

Scanner obx=new Scanner(System.in); //creating Scanner class Object

System.out.print("Enter invest value: "); //print message

investment_amount=obx.nextDouble(); //input value

System.out.print("Enter interest rate: ");//print message

interest_rate=obx.nextDouble();//input value

System.out.print("Enter number of years: ");//print message

years=obx.nextInt();//input value

future_investment_value=investment_amount*Math.pow((1+interest_rate/1200.),years*12); //calculating value by apply formula

System.out.println("you enter amount: $"+investment_amount); //print calculated value

System.out.println("annual interest rate:"+interest_rate+"%");//print calculated value

System.out.printf("Number of years: "+years+" the future investment value is :$%.2f\n",future_investment_value);//print calculated value

}

}

output:

please find the attachment.

Explanation:

Program Description:

  • In the above-given program, inside the main method, a variable is declared that are investment_amount, interest_rate, future_investment_value, and years, in which only year variable is an integer type and other variables are double types.
  • In the next step, a scanner class object that is "obx" is created, which is used to input value from the user end, in the next line we apply the formula to calculate the future_investment_value.
  • At the last step, we all the input and a calculated value    

You might be interested in
There are several methods of updating information and data on a webserver. We must consider who performs those updates upfront w
Thepotemich [5.8K]

Answer:

RTMC pro, HTML server-sent and Java Software Development Kit

Explanation:

<u>RTMC pro</u>:  The setup of RTMC pro is done automatically and there is provision of several elements to upload and store data on the server using screens. Screens are usually saved as files and then integrated to an internal or external server.

<u>HTML server-sent</u> : This is a way for webpages to communicate with the webserver. In this method, for ever HTML page there is an associated script present on the server side that will continuously provide realtime data update. This scrip will have to be configured with the data you want to update.

<u>Java Software Development Kit</u> : JAVA SDK is used to build software/applications on Java. This permits programmers to develop applications or applets to perform data updating on the servers. The developped applets can be used with internal servers as well as third party servers.

5 0
3 years ago
Read 2 more answers
Entering the formula =SUM(C5:C18) in cell C19 will result in which of the following?
frozen [14]
Well the result shown in C19 will show the sum of all cells from C5 to C18:
ie: C5 + C6+ C7+ C8+ C9+ C10+ C11+ C12+ C13+ C14+ C15+ C16+ C17+ C18

:)
3 0
3 years ago
Please help!! I attached an image with the questions.
stira [4]

Answer:

why do you need help

Explanation:

yea

8 0
3 years ago
Which line of code will use the overloaded multiplication operation?
maks197457 [2]

Answer:

def __mul__(self, b):

Explanation:

correct edge 2021

4 0
3 years ago
What is the common name for the growth rate function N?
kolezko [41]

Answer:

Linear.

Explanation:

The common name for the growth rate function N is linear.N growth rate is directly proportional to the input.So it grows linearly.It does not grow rapidly like other growth functions like quadratic,exponential and cubical.

Constant growth does not grow over time it stays as it is.

Hence the answer to this question is linear.

3 0
3 years ago
Other questions:
  • Type the correct answer in the box. Spell all words correctly.
    9·1 answer
  • Mr. Mathis asked his students to add a comment to a cell the students recorded the steps they followed in a chart. Which student
    12·2 answers
  • You view a portion of a document on the screen through a ____.
    6·1 answer
  • In which of the following scenarios would it be best to use a for loop?
    6·1 answer
  • Graphs and charts are two different elements. True or False
    15·1 answer
  • When using a search engine, what is the name of a word or phrase somebody types to find something online?
    12·2 answers
  • HELP PLEASE!!! I do online school, someone is in another state wanting to help me. No not do my work for me but view what I view
    6·1 answer
  • Free 35 points!!!
    11·2 answers
  • Use the {blank} to view your presentation the way an audience will see it.
    13·2 answers
  • How is the architecture converted into software code? Elaborate the steps its passes through with help of examples / Diagram.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!