public static void main(String... args)
    {
    	try
        {
            CA ca = new CA();
            ca.startup();
            int choice;
            while (true)
    		{
            	printCAMenu();
    			choice = choose(" >> ", 0, 1);
    			switch (choice)
    			{
    				case 1 :
    					System.out.println(ca);
    					break;
    				case 0 :
    					InputStreamReader inReader = new InputStreamReader(System.in);
    		    		BufferedReader bufReader = new BufferedReader(inReader);
    		            System.out.println("Save state? (y/n)");
    		            String save = bufReader.readLine();
    		            if (save.toLowerCase().equals("yes") || save.toLowerCase().equals("y"))
    		            	ca.shutdown(true);
    		            else
    		            	ca.shutdown(false);
    		            System.exit(0);
    		            break;
    		        default:
    		        	System.out.println(ca);
    			}
    		}
        }
        catch(Exception e)
        {
            System.out.println("ERROR in CA!");
            e.printStackTrace();
        }
    }