【General guidance】The answer provided below has been developed in a clear step by step manner.Step1/3Let's make the input checking functions for glasses and coating.Here's the code snippet for glass. private static int getValidOptionGlass(Scanner input, int min, int max) { int option; do { option = input.nextInt(); if (option < min || option > max) { System.out.print("1 -> Prescription, 2 -> Non-Prescription : "); } } while (option < min || option > max); return option; }ExplanationThis is a method that takes three parameters: a Scanner object named input, an int named min, and an int named max. The purpose of this method is to repeatedly prompt the user to enter a valid option within a specified range (inclusive of both min and max), until a valid option is entered, and then return that valid option.The method starts by declaring an integer variable option to hold the user's input. Then it enters a do-while loop, which will continue to loop as long as option is less than min or greater than max. Inside the loop, the method prompts the user to enter an option by printing a message on the console.If the user enters an invalid option, i.e., an option that is less than min or greater than max, the method will print another prompt message and loop again. If the user enters a valid option within the specified range, the loop will exit, and the method will return the valid option.Overall, this method is used to ensure that the user enters a valid option for the glasses choice (either 1 or 2) and the coating choice (either 1 or 2), and it does not allow the program to proceed until a valid input is received.Explanation:Please refer to solution in this step.Step2/3Let's make the function to check the input from the user about the coating.private static int getValidOptionCoating(Scanner input, int min, int max) { int option; do { option = input.nextInt(); if (option < min || option > max) { System.out.print("1 -> Anti-glare, 2 -> Brown tint : "); } } while (option < min || option > max); return option; }ExplanationThis is another method that is similar to the getValidOptionGlass method. It takes three parameters: a Scanner object named input, an int named min, and an int named max. The purpose of this method is to repeatedly prompt the user to enter a valid option within a specified range (inclusive of both min and max), until a valid option is entered, and then return that valid option.The method starts by declaring an integer variable option to hold the user's input. Then it enters a do-while loop, which will continue to loop as long as option is less than min or greater than max. Inside the loop, the method prompts the user to enter an option by printing a message on the console.If the user enters an invalid option, i.e., an option that is less than min or greater than max, the method will print another prompt message and loop again. If the user enters a valid option within the specified range, the loop will exit, and the method will return the valid option.Explanation:Please refer to soluti ... See the full answer