MainApplication.java 660B

1234567891011121314151617181920212223242526272829
  1. import java.util.*;
  2. /**
  3. * Created by leon on 1/10/18.
  4. */
  5. public class MainApplication {
  6. public Inventory market = new Inventory("Market");
  7. public static void main(String [] args) {
  8. Scanner scan = new Scanner(System.in);
  9. System.out.println("Hello. Which item would you like information on?");
  10. String name = scan.nextLine();
  11. System.out.println("How many of those are in inventory?");
  12. int amount = scan.nextInt();
  13. System.out.println("How much do they cost per item?");
  14. double price = scan.nextDouble();
  15. System.out.println("Your total value is " + (amount * price));
  16. }
  17. }