Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 307 Weeks Ago, 5 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 15 Sep 2017 My Price 7.00

application named Percentages

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. Thank 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);

   }

}

Thank you

Answers

(5)
Status NEW Posted 15 Sep 2017 01:09 PM My Price 7.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)