subject

Create an application named percentages whose main() method holds two double variables. assign values to the variables. pass both variales to a method named computepercent() that displays the two values and the value of the first number as a percentage of the second one. then call the method a second time, passing the values inreverse order. save as percentages. java

i'm prety much done, i just need this modified to not prompt the user for any information. you

public class percentages {

public static void main(string[] args) {
string inputnumber;
double number1;
double number2;

inputnumber = joptionpane. showinputdialog(null,"plese enter the first number");
number1 = double. parsedouble(inputnumber);
inputnumber = joptionpane. showinputdialog(null,"plese enter the second number");
number2 = double. parsedouble(inputnumber);

computepercent(number1,number2);
computepercent(number2,number1);

}

public static void computepercent(double num1, double num2)
{
joptionpane. showmessagedialog(null, num1 + " is " + num1/num2*100 + "% of " + num2);

}

}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
How will you cite information that is common knowledge in your research paper?
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Type the correct answer in the box. spell all words correctly. under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
question
Computers and Technology, 24.06.2019 12:10
What is it called during the editing process when the processor ensures that a character holding a coffee mug from one angle is holding the same mug in the same way when the shot switches to another camera at another angle? cinematography continuity technology prop use
Answers: 1
You know the right answer?
Create an application named percentages whose main() method holds two double variables. assign value...
Questions
question
Computers and Technology, 26.11.2020 19:50
question
French, 26.11.2020 20:10
Questions on the website: 13722367