From 5138e5d5a79ba564d823602c6b96d58a720f3260 Mon Sep 17 00:00:00 2001 From: top19 Date: Fri, 1 May 2020 10:47:59 +0100 Subject: [PATCH] Changed Question to be non case sensitive when comparing answers. --- .../uk/ac/aber/cs221/group20/selfassessment/Question.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/Question.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/Question.java index 48961c6..4ff3b70 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/Question.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/Question.java @@ -43,7 +43,7 @@ public class Question { .append(" is the English for ") .append("'").append(listOfCorrectQuestions.get(i).getWelsh()).append("'") .append(". "); - if(listOfCorrectQuestions.get(i).getWelsh().equals(listOfAnswers.get(i))){ + if(listOfCorrectQuestions.get(i).getWelsh().equalsIgnoreCase(listOfAnswers.get(i))){ sb.append("Correct!"); correctAnswers++; }else{ @@ -60,7 +60,7 @@ public class Question { .append("'").append(listOfCorrectQuestions.get(i).getWelsh()).append("'") .append(". "); - if(listOfCorrectQuestions.get(i).getEnglish().equals(listOfAnswers.get(i))){ + if(listOfCorrectQuestions.get(i).getEnglish().equalsIgnoreCase(listOfAnswers.get(i))){ sb.append("Correct!"); correctAnswers++; }else{