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
iren2701 [21]
3 years ago
5

Write an application that calculates and displays the amount of money a user would have if his or her money could be invested at

5 percent interest for one year. Create a method that prompts the user for the starting value of the investment and returns it to the calling program. Call a separate method to do the calculation, and return the result to be displayed. Save the program as Interest.java.
Computers and Technology
1 answer:
S_A_V [24]3 years ago
4 0

Answer:

Following are the program to this question:

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

class Interest //defining class Interest

{

   static double rate_of_interest = 5.00;//defining static double varaibale  

   public static double Invest_value()//defining method Invest_value

   {

           double invest;//defining double variable invest

           Scanner inc = new Scanner(System.in);//creating Scanner class object  

           System.out.print("Enter investment value: ");

           invest = inc.nextDouble();//input value in invest variable

           return invest;//return invest value

  }

  public static double calculated_Amount(double invest)//defining method calculated_Amount that accept parameter

  {

           double amount;//defining double variable

           amount = invest+ (invest * (rate_of_interest/100));//use amount to calculat 5 % of invest value

           return amount;//return amount value

  }

   

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

   {

   double investment_value;//defining double variable

   investment_value= Invest_value();//use investment_value to hold method Invest_value value

   System.out.println("The 5% of the invest value: "+ calculated_Amount(investment_value));//use print method to print calculated_Amount value

  }

}

Output:

Enter investment value: 3000

The 5% of the invest value: 3150.0

Explanation:

In the above program a class "Interest", is defined inside the class a static double variable "rate_of_interest"  is declared that store a double value, in the next step, two methods "Invest_value and calculated_Amount" is declared.

In the "Invest_value" method, scanner class object is created for input value in the "invest" variable and the "calculated_Amount" accepts an "invest" value in its parameter and calculate its 5% and store its value in the "amount" variable.

Inside the main method, the "investment_value" is declared that holds the "Invest_value"  method value and pass the value in the "investment_value" variable in the "calculated_Amount" method and prints its return value.

You might be interested in
What is the name of the programming language created by Spu7Nix?
VMariaS [17]
The name of the programming language is “Brainfugd”
3 0
3 years ago
Read 2 more answers
Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guz
Aleksandr [31]

Answer:

The following code is written in java programming language:

//set if statement

if (((modelYear >= 1999) && (modelYear <= 2002) && (modelName == "Extravagant")) || ((modelYear >= 2004) && (modelYear <= 2007) && (modelName == "Guzzler")))

{

recalled = true;    //initialized Boolean value

}

else      //set else statement

{

recalled = false; ////initialized Boolean value

}

Explanation:

Here, we set the if statement and set condition, if the value of modelYear is greater than equal to 1999 and less that equal to 2002 and modelName is equal to "Extravagant" or the value of modelYear is greater than equal to 2004 and less than equal to 2007 and the model year is equal to "Guzzler", than "recalled" initialized to "true".

Otherwise "recalled" initialized to "true".

5 0
3 years ago
You recently completed a network overhaul over the weekend. Everything seems to be functioning properly until you receive a swar
ZanzabumX [31]

Answer:

Network switch has been disconnected or switched off

Explanation:

An organization networking can be done by using several switches, routers, modems, etc. A network switch works between modem and systems, connecting the systems to the network.

A network switch is a multi-port switch that connects multiple devices to the network. mostly every floor has a network switch connected with the floor systems.

When a system is connected to switch, its indicator light on NIC is active. but as per the scenario, no system has active indicator lights on NIC, which means that there is some problem with the switch or switch is powered off.

4 0
3 years ago
The most common schedule for tape-based backup is a _____ backup, either incremental or differential, with a weekly off-site ful
sergejj [24]

The most common schedule for tape-based backup is called the daily on-site backup.

<h3>What is daily backup?</h3>

The daily backup is known to be a kind of backs up of only files that were were said to be modified that day.

A full backup is known to be a full and complete backup of the whole system, such as all applications, operating systems components, etc.

Learn more about  backup from

brainly.com/question/86807

8 0
2 years ago
Where on a computer is the operating system generally stored?
Brilliant_brown [7]

The operating system on a computer is generally stored at hard disk.

4 0
3 years ago
Other questions:
  • In ssl/tls, a specific set of protocols that a particular cryptographic system will use to provide protection is called a ______
    5·1 answer
  • This method of advertising is expensive but can be the most effective method.
    15·1 answer
  • The scheme function (mult2-diff Ist) should take one argument, a list of numbers, and results in multiplying each number in the
    11·1 answer
  • According to social penetration theory, the __________ dimension concerns the number of topics disclosed whereas the __________
    6·1 answer
  • I.d 9934607467<br> p.a.s.s 54321<br><br> P.L.E.A.S.E J.O.I.N. Z.O.0.M. M.E.E.T.I.N.G
    10·1 answer
  • HI How are you anyways are any of you intreseted in my giveaway
    7·2 answers
  • Hello my name is Phoenix I will like for you to friend me on Ro blox my user name is Jessiahcoleman and if u play BLOX fruits or
    13·1 answer
  • Lol fortnite really going UwU and anime
    12·2 answers
  • Which Python expression results in 49?<br><br> 7 * 2<br><br> 7^2<br><br> 7 // 2<br><br> 7 ** 2
    12·2 answers
  • How to automatically forward text messages to another phone iphone.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!