private void askQuestions(String[] questions, String[] answers) {
int count = 0;
int point = 0;
for(int j = 0; j < questions.length; j++) {
if(!timeForMore)
break;
String input = JOptionPane.showInputDialog(null, questions[j]);
if(answers[j].equals(input)) {
count++;
point++;
}
}
JOptionPane.showMessageDialog(null, "You answered " + count +
" out of " + questions.length +
" questions correctly.");
JOptionPane.showMessageDialog(null, "Your Geography Quiz score is " +
((point*100)/10) + " % ");
if(point>=0 && point<=3) {
JOptionPane.showMessageDialog(null, "You need to Improve");
}
if(point>=4 && point<=7) {
JOptionPane.showMessageDialog(null, "Good");
}
if(point>=8 && point<=10) {
JOptionPane.showMessageDialog(null, "You did Great");
}
}