diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/AddWordController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/AddWordController.java index bba7db5..685dc03 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/AddWordController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/AddWordController.java @@ -38,6 +38,10 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry; */ public class AddWordController extends SharedCodeController { + // /////////////////// // + // Instance variables. // + // /////////////////// // + @FXML private TextField welsh; @FXML @@ -45,12 +49,15 @@ public class AddWordController extends SharedCodeController { @FXML private ComboBox wordType; + // //////// // + // Methods. // + // //////// // + /** * Gets the value from the welsh text field * * @return welsh */ - public TextField getWelsh() { return welsh; } @@ -60,7 +67,6 @@ public class AddWordController extends SharedCodeController { * * @return english */ - public TextField getEnglish() { return english; } @@ -86,7 +92,6 @@ public class AddWordController extends SharedCodeController { * @see Application * @see DictionaryEntry */ - @FXML protected void addButtonClick(ActionEvent actionEvent) { DictionaryEntry.wordTypeEnum trueWordType; @@ -172,7 +177,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addChardd(ActionEvent actionEvent) { welsh.appendText("dd"); } @@ -182,7 +186,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharff(ActionEvent actionEvent) { welsh.appendText("ff"); } @@ -192,7 +195,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharng(ActionEvent actionEvent) { welsh.appendText("ng"); } @@ -202,7 +204,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharll(ActionEvent actionEvent) { welsh.appendText("ll"); } @@ -212,7 +213,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharph(ActionEvent actionEvent) { welsh.appendText("ph"); } @@ -222,7 +222,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharrh(ActionEvent actionEvent) { welsh.appendText("rh"); } @@ -232,7 +231,6 @@ public class AddWordController extends SharedCodeController { * * @param actionEvent action event for the button click */ - public void addCharth(ActionEvent actionEvent) { welsh.appendText("th"); } diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/MatchTheMeaningController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/MatchTheMeaningController.java index 85b68c5..7df1d6f 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/MatchTheMeaningController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/MatchTheMeaningController.java @@ -39,12 +39,19 @@ import java.util.*; public class MatchTheMeaningController extends SharedCodeController { + // //////////////// // + // Class variables. // + // //////////////// // public static ArrayList answer =new ArrayList<>(); + + // /////////////////// // + // Instance variables. // + // /////////////////// // + private ArrayList orderList = new ArrayList<>(Arrays.asList(0,1,2,3)); private boolean isEnglish = AssessmentGenerator.isEnglish; - @FXML private ComboBox word1; @@ -87,7 +94,9 @@ public class MatchTheMeaningController extends SharedCodeController { @FXML private Label WrongAnswer; - + // //////// // + // Methods. // + // //////// // /** * Set chosen words from dictionary on the scene. diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SixMeaningsController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SixMeaningsController.java index e7c76bf..dba2b9f 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SixMeaningsController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SixMeaningsController.java @@ -38,13 +38,21 @@ import java.util.*; public class SixMeaningsController extends SharedCodeController { - private ArrayList wordSet = new ArrayList<>(); + // //////////////// // + // Class variables. // + // //////////////// // + public static ArrayList allQuestions = new ArrayList<>(); + + // /////////////////// // + // Instance variables. // + // /////////////////// // + + private ArrayList wordSet = new ArrayList<>(); private ArrayList orderList = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5)); private String wordCounterpart; private boolean isEnglish = AssessmentGenerator.isEnglish; - @FXML private Text correctAnswer; @@ -72,6 +80,10 @@ public class SixMeaningsController extends SharedCodeController { @FXML private Text possibleAnswer6; + // //////// // + // Methods. // + // //////// // + @FXML void answer1(MouseEvent event) { wordCounterpart = possibleAnswer1.getText(); diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/TranslationController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/TranslationController.java index ecce610..99de1b5 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/TranslationController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/TranslationController.java @@ -24,9 +24,17 @@ import uk.ac.aber.cs22120.group20.selfassessment.Question; * */ public class TranslationController extends SharedCodeController{ - private ArrayList practiceList = new ArrayList<>(); + + // //////////////// // + // Class variables. // + // //////////////// // + public static DictionaryEntry answer = new DictionaryEntry(); + // /////////////////// // + // Instance variables. // + // /////////////////// // + /** * Represents the word that will be randomly chosen from the practiceList. */ @@ -51,7 +59,9 @@ public class TranslationController extends SharedCodeController{ Random rand = new Random(); - + // //////// // + // Methods. // + // //////// // /** * Loads the test for the first time, filling the practice list with words from the dictionary,