diff --git a/dev/20200407/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml b/dev/20200407/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml index c7bf461..8b7616c 100644 --- a/dev/20200407/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml +++ b/dev/20200407/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml @@ -1,11 +1,7 @@ - - - - - + diff --git a/dev/20200407/kab74/Welsh Vocabulary Tutor/src/main/java/JSON/DictionaryEntry.java b/dev/20200407/kab74/Welsh Vocabulary Tutor/src/main/java/JSON/DictionaryEntry.java index 668ae5b..123a4da 100644 --- a/dev/20200407/kab74/Welsh Vocabulary Tutor/src/main/java/JSON/DictionaryEntry.java +++ b/dev/20200407/kab74/Welsh Vocabulary Tutor/src/main/java/JSON/DictionaryEntry.java @@ -105,4 +105,10 @@ public class DictionaryEntry { "practiceWord = " + isPracticeWord; } + + @Override + public boolean equals(Object obj){ + DictionaryEntry otherObject = (DictionaryEntry) obj; + return (this.getEnglishWord().equals(otherObject.getEnglishWord())) && this.getWelshWord().equals(otherObject.getWelshWord()); + } } diff --git a/dev/20200414/kab74/DesignSpecGroup20.docx b/dev/20200414/kab74/DesignSpecGroup20.docx new file mode 100644 index 0000000..4f4c9ea Binary files /dev/null and b/dev/20200414/kab74/DesignSpecGroup20.docx differ diff --git a/dev/20200414/kab74/DesignSpecGroup20.odg b/dev/20200414/kab74/DesignSpecGroup20.odg new file mode 100644 index 0000000..8c8dcba Binary files /dev/null and b/dev/20200414/kab74/DesignSpecGroup20.odg differ diff --git a/dev/20200414/kab74/DesignSpecGroup20.pdf b/dev/20200414/kab74/DesignSpecGroup20.pdf new file mode 100644 index 0000000..4f4c9ea Binary files /dev/null and b/dev/20200414/kab74/DesignSpecGroup20.pdf differ diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/compiler.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/compiler.xml new file mode 100644 index 0000000..0c465ee --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/encodings.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/encodings.xml new file mode 100644 index 0000000..34d7d10 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/encodings.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/misc.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/misc.xml new file mode 100644 index 0000000..a2037a3 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/vcs.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/vcs.xml new file mode 100644 index 0000000..423963a --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml new file mode 100644 index 0000000..b953ed8 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/.idea/workspace.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1585703857421 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/pom.xml b/dev/20200414/kab74/Welsh Vocabulary Tutor/pom.xml new file mode 100644 index 0000000..d2e762f --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/pom.xml @@ -0,0 +1,44 @@ + + 4.0.0 + uk.ac.aber.cs22120.group20 + Welsh Vocabulary Tutor + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 11 + + + org.openjfx + javafx-fxml + 11 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.1 + + uk.ac.aber.cs22120.group20.App + + + + + \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/module-info.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/module-info.java new file mode 100644 index 0000000..5d44bb3 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/module-info.java @@ -0,0 +1,7 @@ +module uk.ac.aber.cs22120.group20 { + requires javafx.controls; + requires javafx.fxml; + + opens uk.ac.aber.cs22120.group20 to javafx.fxml; + exports uk.ac.aber.cs22120.group20; +} \ No newline at end of file diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/Application.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/Application.java new file mode 100644 index 0000000..de955ca --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/Application.java @@ -0,0 +1,27 @@ +package uk.ac.aber.cs22120.group20.javafx; + +import javafx.scene.Scene; + +/** + * Programs main class that contains a list of the loaded dictionary definitions and is + * responsible for running the application. + * Launch class of the Welsh Vocabulary tutor Application + * @author Kain Bryan-Jones [kab74] + * @author Brad Corbett [brc9] + * @author Henry Dugmore [hjd3] + * @author Marcin Jakob [maj83] + * @author Tom Perry [top1] + * @author Oscar Pocock [osp1] + * @author Waylen Watts [ncw] + * @author Luke Wybar [law39] + * @version 0.1 + * @See + */ +public class Application { + + public static void main(String[] args) { + + } + +} + diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/ScreenSwitch.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/ScreenSwitch.java new file mode 100644 index 0000000..5b78e25 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/ScreenSwitch.java @@ -0,0 +1,20 @@ +package uk.ac.aber.cs22120.group20.javafx; + +/** + * Class that contains all the scenes for the JavaFX user interface and will be responsible + * for initiating the transition to new ones. + * @Author + * @Version + * @See + */ +public class ScreenSwitch extends SharedCodeController { + + /** + * Method that is responsible for the switching between + * JavaFX, with it taking the new scene’s name as a parameter. + */ + public void swap(SceneEnum newScene){ + + } + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SharedCodeController.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SharedCodeController.java new file mode 100644 index 0000000..bd071cf --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/javafx/SharedCodeController.java @@ -0,0 +1,12 @@ +package uk.ac.aber.cs22120.group20.javafx; + +/** + * Abstract class that contains all the shared FXML elements between the + * different controller classes including the sliding menu and the test score counter, to reduce code + * duplication. This will be extended by all the controller classes. + * @Author + * @Version + * @See + */ +abstract public class SharedCodeController { +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/JSONProcessor.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/JSONProcessor.java new file mode 100644 index 0000000..755ebb2 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/JSONProcessor.java @@ -0,0 +1,31 @@ +package uk.ac.aber.cs22120.group20.json; + +import java.io.*; +import java.util.*; + +/** + * Contains functions responsible for saving and loading to and from the JSON file + * which will be provided by the user, using the Jackson JSON library. + * @Author + * @Version + * @See + */ +public class JSONProcessor { + + /** + * Method for loading the list of + * dictionary definitions from a JSON file. + * @param dictionaryFile + */ + public LinkedList load(File dictionaryFile){ + + } + + /** + * Method for saving + * the list of dictionary definitions to a JSON file. + */ + public void save(File dictionaryFile, LinkedList words){ + + } +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/WelshDictionary.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/WelshDictionary.java new file mode 100644 index 0000000..2decbdb --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/json/WelshDictionary.java @@ -0,0 +1,119 @@ +package uk.ac.aber.cs22120.group20.json; + +/** + * Class containing all the fields needed for storing dictionary definitions including + * Welsh and English translations along with its word type and whether it’s a practice word or not. + * @Author + * @Version + * @See + */ +public class WelshDictionary implements Comparable{ + + private String welshWord; + private String englishWord; + private String wordType; + private boolean isPracticeWord; + private String practiceWord; + + /** + * Default constructor for WelshDictionary. + */ + public WelshDictionary(){}; + + /** + * + * @param englishWord + * @param welshWord + * @param wordType + * @param isPracticeWord + */ + public WelshDictionary(String englishWord, String welshWord, String wordType, Boolean isPracticeWord){ + + } + + /** + * + * @return + */ + public String getWelshWord(){ + return welshWord; + } + + /** + * + * @return + */ + public String getEnglishWord(){ + return englishWord; + } + + /** + * + * @return + */ + public String getWordType(){ + return wordType; + } + + /** + * + * @return + */ + public boolean isPracticeWord(){ + return isPracticeWord(); + } + + /** + * + * @param welshWord + */ + public void setWelshWord(String welshWord){ + this.welshWord=welshWord; + } + + /** + * + * @param englishWord + */ + public void setEnglishWord(String englishWord){ + this.englishWord=englishWord; + + } + + /** + * + * @param wordType + */ + public void setWordType(String wordType){ + this.wordType=wordType; + } + + /** + * + * @param practiceWord + */ + public void setPracticeWord(String practiceWord){ + this.practiceWord() = practiceWord; + } + + /** + * + * @param o + * @return + */ + @Override + public boolean equals(Object o){ + + } + + /** + * + * @param welshDictionary + * @return + */ + @Override + public int compareTo(WelshDictionary welshDictionary) { + return 0; + } + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/AssessmentGenerator.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/AssessmentGenerator.java new file mode 100644 index 0000000..fb65f3b --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/AssessmentGenerator.java @@ -0,0 +1,57 @@ +package uk.ac.aber.cs22120.group20.selfassessment; + +import uk.ac.aber.cs22120.group20.json.WelshDictionary; + +import java.util.LinkedList; + +/** + * Class that contains methods to create a randomised list of questions that will + * contain a random distribution of question types. + * @Author + * @Version + * @See + */ +public class AssessmentGenerator extends Question{ + + /** + * Method that will generate a randomized list of questions consisting of random distribution of questions + * types, using the dictionary’s practice words as the parameter. + * @param wordList + * @return + */ + public LinkedList generateAssessment(LinkedList wordList){ + + } + + /** + * Method + * that will generate a list of questions that are the type ‘Match The Meanings’, using the dictionary's + * practice words as the parameter. + * @return + */ + public LinkedList generateWordMatch(LinkedList){ + + } + + /** + * Method + * that will generate a list of questions that are the type ‘6 Meanings’, using the dictionary's practice + * words as the parameter. + * @return + */ + public LinkedList generateSixMeanings(LinkedList){ + + } + + /** + * Method that + * will generate a list of questions that are the type ‘Translation’, using the dictionary's practice words as + * the parameter. + * @return + */ + public LinkedList generateWordEnter(LinkedList){ + + } + + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/Question.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/Question.java new file mode 100644 index 0000000..0380d6e --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/Question.java @@ -0,0 +1,24 @@ +package uk.ac.aber.cs22120.group20.selfassessment; + +import uk.ac.aber.cs22120.group20.json.WelshDictionary; + +/** + * Abstract class contains the basic information that all the shared information between the + * types of test questions including the questions’ correct answers and possible answers. All question + * classes will extend this class. + * @Author + * @Version + * @See + */ +public class Question { + + /** + * Constructor for + * WordEnterQuestion that takes a WelshDictionary object that is being tested on as the parameter. + * @param correctAnswer + */ + public wordEnterQuestion(WelshDictionary correctAnswer){ + + } + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/SixMeaningsQuestion.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/SixMeaningsQuestion.java new file mode 100644 index 0000000..935f016 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/SixMeaningsQuestion.java @@ -0,0 +1,26 @@ +package uk.ac.aber.cs22120.group20.selfassessment; + +import uk.ac.aber.cs22120.group20.json.WelshDictionary; + +/** + * Class that contains all the details needed for the ‘Six Meanings’ question + * type, including the correct answer along with the five other possible answers. This class will be used by + * the AssessmentGenerator and extends the Question class. + * @Author + * @Version + * @See + */ +public class SixMeaningsQuestion extends Question { + + /** + * Constructor for SixMeaningQuestion that takes one WelshDictionary object that is being + * tested along with the full list of words which will be used to generate randomized possible answers as + * the parameters. + * @param correctAnswer + * @param dictionary + */ + public sixMeaningQuestions(WelshDictionary correctAnswer, LinkedList dictionary){ + + } + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordEnterQuestion.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordEnterQuestion.java new file mode 100644 index 0000000..3623d68 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordEnterQuestion.java @@ -0,0 +1,25 @@ +package uk.ac.aber.cs22120.group20.selfassessment; + +import uk.ac.aber.cs22120.group20.json.WelshDictionary; + +/** + * Class that contains all the details needed for the ‘Translation’ question type, + * including the practice definition that is being tested. This class will be used by the + * AssessmentGenerator and extends the Question class. + * @Author + * @Version + * @See + */ +public class WordEnterQuestion extends Question{ + + /** + * Constructor for + * WordEnterQuestion that takes a WelshDictionary object that is being tested on as the parameter. + * @param correctAnswer + */ + public WordEnterQuestion(WelshDictionary correctAnswer){ + + } + +} + diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordMatchQuestion.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordMatchQuestion.java new file mode 100644 index 0000000..e373a9d --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/selfassessment/WordMatchQuestion.java @@ -0,0 +1,25 @@ +package uk.ac.aber.cs22120.group20.selfassessment; + +import uk.ac.aber.cs22120.group20.json.WelshDictionary; + +/** + * Class that contains all the details needed for the ‘Match the Meanings’ + * question type, including the 4 different practice definitions. This class will be used by the + * AssessmentGenerator and extends the Question class. + * @Author + * @Version + * @See + */ +public class WordMatchQuestion { + + /** + * Class that contains all the details needed for the ‘Match the Meanings’ + * question type, including the 4 different practice definitions. This class will be used by the + * AssessmentGenerator and extends the Question class. + * @param correctAnswers + */ + public WordMatchQuestion(WelshDictionary[] correctAnswers){ + + } + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JSONTest.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JSONTest.java new file mode 100644 index 0000000..5317909 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JSONTest.java @@ -0,0 +1,28 @@ +package uk.ac.aber.cs22120.group20.test; + +/** + * Class that contains methods which will be used to test that the JSON package classes are + * correctly loading and saving to and from the JSON file. + * @Author + * @Version + * @See + */ +public class JSONTest { + + /** + * JUnit test to check that the JSON file has been correctly loaded. + */ + @test public void testLoad(){ + + } + + /** + * JUnit test to check that any changes to the list of definitions are + * updated and saved to the JSON file accordingly. + */ + @test public void testSave(){ + + } + + +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JavaFXTest.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JavaFXTest.java new file mode 100644 index 0000000..bfcb8a1 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/JavaFXTest.java @@ -0,0 +1,54 @@ +package uk.ac.aber.cs22120.group20.test; + +/** + * Class that contains methods to test that the application class is correctly storing the full + * list of dictionary definitions. + * Furthermore, this class will also test that the elements such as the sliding menu and score counter are + * working as intended, along with testing that scenes are ending and transitioning correctly when + * applicable. + * @Author + * @Version + * @See + */ +public class JavaFXTest { + + /** + * Tests to confirm that the dictionary definitions loaded match to an + * identical base set. + */ + @test public void testDefinition(){ + + } + + /** + * Test to confirm that the user score counter correctly increases + * by increments on one. + */ + @test public void testScoreCounter(){ + + } + + /** + * A preset search test to confirm that words are being searched for + * correctly. + */ + @test public void testFindWord(){ + + } + + /** + * A test to check that a new word is correctly added and saved to + * the JSON file. + */ + @test public void testAddWord(){ + + } + + /** + *A test to check that the JSON file is correctly updated when a + * word is removed. + */ + @test public void testRemoveWord(){ + + } +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/SelfAssesmentTest.java b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/SelfAssesmentTest.java new file mode 100644 index 0000000..2c77981 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs22120/group20/test/SelfAssesmentTest.java @@ -0,0 +1,36 @@ +package uk.ac.aber.cs22120.group20.test; + +/** + * This class will test that the lists pulled in the self-assessment package are indeed + * random, while also pulling the matching data from the dictionary. + * @Author + * @Version + * @See + */ +public class SelfAssesmentTest { + + /** + * Test to confirm that the random number return is working + * correctly. + */ + @test + public void testRandomReturn(){ + + } + + /** + * Test to check and confirm that the game types are + * either made available or are locked off depending on the number of practice list questions. + */ + @test + public void testAvailableSelfAssessment(){ + + } + + /** + * Test that will check that an input by a user is correctly checked + * to the correct answer. + */ + @test + public void testUserAnswer(){} +} diff --git a/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml new file mode 100644 index 0000000..e2ba159 --- /dev/null +++ b/dev/20200414/kab74/Welsh Vocabulary Tutor/src/main/resources/uk/ac/aber/cs22120/group20/primary.fxml @@ -0,0 +1,16 @@ + + + + + + + + + +