public static void main(String[] args) throws ReadItemLineException, IOException {


        BufferedReader br = null;
        Reader r = new InputStreamReader(System.in);
        br = new BufferedReader(r);
        String str = null;
        String outStr = null;
        try {
            do{
                System.out.println("Please select file.(input1, input2, input3)");
                str = br.readLine();
                
                if(StringUtils.equalsIgnoreCase(str, "input1")
                	|| StringUtils.equalsIgnoreCase(str, "input2")
                	|| StringUtils.equalsIgnoreCase(str, "input3")){
                	outStr = StringUtils.replaceChars(str, 'i', 'o');
                    File inputFile = new File("."+File.separator +"data"+File.separator + str);        
                    File outputFile = new File("."+File.separator +"data"+File.separator + outStr);
                    //Once input file is determined, SaleTaxController is called for purchasing items
            		SaleTaxController saleTaxController = SaleTaxController.getInstance();
            		saleTaxController.printReceipt(inputFile, outputFile);                   	
                }else{
                    System.out.println("Wrong file name");                    
                }

            } while (!str.equalsIgnoreCase("exit"));
        } catch (IOException e) {
            e.printStackTrace();
        } finally{
            try{
                if(br != null) br.close();
            }catch(Exception ex){}
        }		


	}