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
Hey so, I was looking online how to reset my laptop and I ended up pressing load setup defaults and now I get an error saying ch
storchak [24]

Press and hold the Power key for 5 seconds to power the system off completely.

Press the Power key to turn on the computer.

Press the Alt and F10 keys at the same time when the Acer logo appears on the screen. Your system should boot to a blue screen that says Choose an option.

Select Troubleshoot.

Click Reset your PC. This process will erase all data on the your system. Choose the Refresh your PC option if you want to restore your system and retain your data.

Click Next, then select Just remove my files.

Click Reset to begin the recovery.

5 0
3 years ago
Read 2 more answers
Graded Assignments may be found at the end of each chapter of the required textbook under the title "Real-World Exercises". Each
mina [271]
Ok chapter 2 be done by 11:59
5 0
3 years ago
You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
scZoUnD [109]

Incomplete question. Here's the remaining part of the question.

a. <sig> <pubKey>

b. <password>

c. <sig> <password>

d. <pubKey> <password>

Answer:

<u>a</u>

Explanation:

Remember, Bitcoin also has its script code which is called ScriptPubkey.

To redeem a transaction implies using the script

<sig> <pubKey>

for the receiving Bitcoin address.

Put simply, the purpose of this script is to lock (redeem) the transaction using the public key (bitcoin address).

7 0
4 years ago
A network host with an IP address of 192.168.10.200 wants to send a message to a destination computer with an assigned IP addres
Mariulka [41]

Answer:

A Subnet Mask

Explanation:

A Subnet mask is used by the TCP/IP protocol to determine whether a host is on the local Subnet or on a remote network.

In TCP/IP, the parts of the IP address that are used as the network and host addresses are not fixed, so the destination host address 192.168.10.100 cannot be determined by the network host (192.168.10.200) unless it has more information. This information is supplied in another 32-bit number called a Subnet mask.

4 0
4 years ago
Which are elements involved in diagramming a solution? Choose all that apply.
katovenus [111]

Answer:

1) showing a visual graphic of the solution

3) showing the flow of information through the solution

4) showing decision points

5) showing the path of information to decision points

Explanation:

 I'm sure this is the answer!!

4 0
3 years ago
Other questions:
  • In two or more complete sentences, summarize the difference between renewable and nonrenewable resources? Justify your responses
    13·2 answers
  • A. True
    5·1 answer
  • In which of the following stages of the development process is a team MOST likely to interview a potential user of an app?
    6·1 answer
  • What is the name of the computer through which e-mail messages are sent and received?
    12·1 answer
  • Which class of fire extinguisher is appropriate for a fire involving electrical/energized electrical equipment?
    13·2 answers
  • Problem 4 (3 pts): Let n be a positive integer. Show that among any group of n 1 (not necessarily consecutive) positive integers
    15·1 answer
  • A great way to obtain Hands-On training in a real quick environment is to complete a ??
    12·1 answer
  • What is the combination of the mechanical or digital process of film production and the illusion or illusions created in the min
    12·1 answer
  • Given four files named asiasales2009.txt, europesales2009.txt, africasales2009.txt, latinamericasales2009.txt, define four ofstr
    12·1 answer
  • What are some specific ways that businesses use the internet?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!