ask a question that only accept a YES or NO answer
public static String askQuestion(String question){
Scanner ans=new Scanner(System.in);
String response;
do{
System.out.println(question);
response=ans.next();
}while(!response.equalsIgnoreCase("yes")||!response.equalsIgnoreCase("no"));
return response;
}