Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Module Two Assignment

This is my code :

package stockinventorie.java;

import java.util.Scanner; // Needed for input

Need assignment help for this question?

If you need assistance with writing your essay, we are ready to help you!

OUR PROCESS

Order

Payment

Writing

Delivery

Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality

import java.lang.Math;  // Needed for math functions

public class StockInventorieJava {

  public static void main(String[] args) {

   Scanner scnr = new Scanner(System.in); 

   String fruitNameOne;

   int applesOnHand;

   int applesSold;

   final double applesToOrder;

   String fruitNameTwo;

   int orangesOnHand;

   int orangesSold;

   final double orangesToOrder;

   //Promt user to enter the fruit one in stock.

   System.out.println(” Fruits in stock: apples “);

   fruitNameOne = scnr.nextLine();

   // Promt user to enter how many apples are in stock.

   System.out.println(“Apples on hand : 50”);

   applesOnHand = scnr.nextInt();

   //Promt user to enter how many apples are sold.

   System.out.println(” Apples sold : 40 “);

   applesSold = scnr.nextInt();

   //Promt user to enter how many apples showld be ordered.

   applesToOrder = applesOnHand – applesSold;

   System.out.println(“In stock should be : ” + applesToOrder);

   //Promt user to enter the fruit name two in stock.

   System.out.println(“Fruits in tstock : oranges “);

   fruitNameTwo = scnr.nextLine();

   // Promt user to enter how many oranges are in stock.

   System.out.println(” Oranges on Hand: 80 “);

   orangesOnHand = scnr.nextInt();

   //Promt user to enter how many oranges are sold.

   System.out.println(“Oranges sold: 62 “);

   orangesSold = scnr.nextInt();

   //Promt user to enter how many oranges showld be ordered

   orangesToOrder = orangesOnHand – orangesSold;

   System.out.println(“In stock should be: ” + orangesToOrder );

  } 

}

IT DOSEN’T WORK. PLEASE HELP WITH THE RIGHT CODE. WHEN I EXECUTE IT READS ONLY : “Fruits in stock : apples”. IT DOSEN’T TELL ME ANY ERROR…

“Order a similar paper and get 15% discount on your first order with us
Use the following coupon
“FIRST15”

Order Now