public Product inputProduct() {
        Product product = null;
        String reply = keyboard("Select product (y - Yes, n - No)");
        if (reply.equals("y")) {
            product = selectProduct();
        }

        if (product != null) {
            return product;
        }

        String typeOfTheProduct = keyboard("Select the type of the product(1 = Botinki. 2 = Foto.)");
        String title = keyboard("Enter the name of the product");
        String price = keyboard("Enter the price of the product");
        Double dPrice = null;

        try {
            dPrice = Double.valueOf(price);
        } catch (NumberFormatException e){
            System.err.println(ERROR_MSG);
            System.exit(1);
        }

        if(Integer.valueOf(typeOfTheProduct) == 1) {
            BotinkiProduct productBotinki = new BotinkiProduct();
            String color = keyboard("Enter the color of the shoes");
                productBotinki.setColor(color);
            product = productBotinki;
        } else if (Integer.valueOf(typeOfTheProduct) == 2) {
            FotoProduct productFoto = new FotoProduct();
            try {
            String megapx = keyboard("Enter the number of megapixels ");
                productFoto.setMegapx(Double.valueOf(megapx));
            String digital = keyboard("Does it digital(True or False)");
                productFoto.setDigital(Boolean.valueOf(digital));
            } catch (NumberFormatException e){
                System.err.println(ERROR_MSG);
                System.exit(1);
            }
                product = productFoto;
        } else {
            System.err.println(ERROR_MSG);
            System.exit(1);
        }

        try {
            product.setTitle(title);
            product.setPrice(dPrice);
        } catch (NumberFormatException e){
            System.err.println(ERROR_MSG);
            System.exit(1);
        }

        // Adding product to cache
        this.products.add(product);
        return product;
    }