My program runs from the command line and requires the user to enter booleans (yes or no) and integers (numbers without decimals). For this I have two methods to check to make sure the user makes a valid entry, for example if the user is asked what temperature it is outside "cheese" isn't a valid response. What should happen if the user gives invalid input? Should the same prompt be repeated? Should it remind the user of the input type needed?
Please enter your height in cm: xyz Please enter an integer. Please enter your height in cm: 180 Do you wear glasses: 5 Please enter y/n. Do you wear glasses: blah Please enter y/n. Do you wear glasses: y
Also, is it clear if a boolean is expected to tell the user to answer using y/n?