import MyExceptions.*;                                      //import custom Application Exceptions

public class Application
{
    public static void main(String[] args)
    {
        String existing_custId = "12345678";

        try {
            if (args.length < 2) 
                throw new ExceptParam();  

            String custId  = args[0];
            double balance = Double.parseDouble(args[1]);   //convert String to double
                                                            //may cause a JVM Exception

            if (custId == null || custId.equals("") )    
                throw new ExceptNotFound();

            if (custId.equals(existing_custId)) 
                throw new ExceptDuplicate();  

            if (balance <= 0)   
                throw new ExceptBalance();
        }
        catch(Exception e) {
            System.out.println("ERROR - " + e);
            System.exit(-1);  
        }
       
        System.out.println("Customer processed successfully");
    }
}