Пример #1
0
 /** Handles load setting */
 public static void runL() {
   System.out.println("Enter the product name: ");
   String n = input.nextLine();
   System.out.println("Enter the product weight in tons: ");
   double w = input.nextDouble();
   System.out.print("Enter the value in dollars: ");
   double v = input.nextDouble();
   System.out.print("Is the product dangerous? (Y/N)");
   String d = input.nextLine();
   boolean b = false;
   if (d.equals("Y")) b = true;
   list.getCursorData().setProductLoad(new ProductLoad(n, w, v, b));
   list.setWeight(list.getWeight() + w);
   list.setValue(list.getValue() + v);
 }