Added JavaDoc to selfassessment package
Added JavaDocs to classes in the selfassessment package as provided by Brad Corbett (brc9)
This commit is contained in:
parent
8a8a4f1277
commit
a2a79f4745
5 changed files with 83 additions and 10 deletions
|
@ -15,9 +15,23 @@ import java.util.*;
|
|||
* Class that contains methods to create a randomised list of questions that will
|
||||
* contain a random distribution of question types.
|
||||
*
|
||||
* @Author
|
||||
* @Version
|
||||
* @See
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @See Question
|
||||
* @See SixMeaningsQuestion
|
||||
* @See TranslationQuestion
|
||||
* @See MatchTheMeaningQuestion
|
||||
* @See ScreenSwitch
|
||||
* @See SixMeaningsController
|
||||
* @See TranslationController
|
||||
* @See MatchTheMeaningController
|
||||
*/
|
||||
public class AssessmentGenerator {
|
||||
public static boolean isEnglish;
|
||||
|
|
|
@ -5,6 +5,21 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Class used to create a MatchTheMeaning Question.
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @See Question
|
||||
*/
|
||||
|
||||
|
||||
public class MatchTheMeaningQuestion extends Question {
|
||||
private ArrayList<DictionaryEntry> correctAnswer = new ArrayList<>();
|
||||
|
||||
|
|
|
@ -12,9 +12,15 @@ import java.util.ArrayList;
|
|||
* 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
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
*/
|
||||
public class Question {
|
||||
|
||||
|
@ -22,11 +28,11 @@ public class Question {
|
|||
public static int wrongAnswers =0;
|
||||
public static StringBuilder sb = new StringBuilder();
|
||||
|
||||
/**
|
||||
/** Function that checks the answers of
|
||||
*
|
||||
* @param listOfCorrectQuestions
|
||||
* @param listOfAnswers
|
||||
* @param isEnglish
|
||||
* @param listOfCorrectQuestions List of the right answers to the question.
|
||||
* @param listOfAnswers List of the answers the user input.
|
||||
* @param isEnglish Boolean for if the test is English To Welsh or Welsh To English
|
||||
*/
|
||||
public static void checkAnswer(ArrayList<DictionaryEntry> listOfCorrectQuestions, ArrayList<String>listOfAnswers, boolean isEnglish){
|
||||
|
||||
|
@ -69,6 +75,9 @@ public class Question {
|
|||
|
||||
|
||||
}
|
||||
/**
|
||||
* Function for giving user positive or negative feedback for when they answer a question during an assessment.
|
||||
*/
|
||||
|
||||
static void showFeedback(){
|
||||
Alert alert = new Alert(Alert.AlertType.INFORMATION);
|
||||
|
@ -91,6 +100,9 @@ public class Question {
|
|||
resetScore();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the score to 0 for the next test.
|
||||
*/
|
||||
private static void resetScore(){
|
||||
correctAnswers = 0;
|
||||
wrongAnswers =0;
|
||||
|
|
|
@ -7,6 +7,19 @@ import java.util.ArrayList;
|
|||
import java.util.Dictionary;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Random;
|
||||
/**
|
||||
* Class used to create a SixMeanings Question.
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @See Question
|
||||
*/
|
||||
|
||||
public class SixMeaningsQuestion extends Question{
|
||||
private DictionaryEntry correctAnswer;
|
||||
|
@ -17,6 +30,11 @@ public class SixMeaningsQuestion extends Question{
|
|||
this.dictionary = dictionary;
|
||||
}
|
||||
|
||||
/** Function to retrieve the correct answer to a SixMeaningsQuestion.
|
||||
*
|
||||
* @return Retrieves the correct answer
|
||||
*/
|
||||
|
||||
public ArrayList<DictionaryEntry> getCorrectAnswer() {
|
||||
Random rand = new Random();
|
||||
|
||||
|
|
|
@ -4,6 +4,20 @@ import uk.ac.aber.cs22120.group20.json.DictionaryEntry;
|
|||
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* Class used to create a MatchTheMeaning Question.
|
||||
* @author Brad Corbett [brc9]
|
||||
* @author Henry Dugmore [hjd3]
|
||||
* @author Kain Bryan-Jones [kab74]
|
||||
* @author Luke Wybar [law39]
|
||||
* @author Marcin Jakob [maj83]
|
||||
* @author Oscar Pocock [osp1]
|
||||
* @author Tom Perry [top1]
|
||||
* @author Waylen Watts [ncw]
|
||||
* @version 0.1 Initial development
|
||||
* @See Question
|
||||
*/
|
||||
|
||||
public class TranslationQuestion extends Question {
|
||||
private DictionaryEntry correctAnswer;
|
||||
|
||||
|
|
Reference in a new issue