SHARE
TWEET

ES Portal

a guest Oct 21st, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.*;
  2. public class EsPortal {
  3.    
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.         String items;
  7.         double itemsPrice = 0;
  8.         int itemsStock = 50;
  9.         System.out.println("ES Companies Portal – Cashier App 3");
  10.         System.out.println("===================================");
  11.        
  12.         do {
  13.             System.out.println("Input item's name [5..30 character]");
  14.             items = scan.nextLine();
  15.         } while(!(items.length() >= 5 && items.length()<=30));
  16.        
  17.         do {
  18.             System.out.println("Input item's price [use decimal number 20...2000]");
  19.            
  20.             try{
  21.                 itemsPrice = scan.nextDouble();
  22.             }catch (Exception e) {}
  23.            
  24.         }while(!(itemsPrice >=20 && itemsPrice <=2000));
  25.        
  26.    
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top