page6
Software Engineering Group Project 20: Design Specification/1.0 (Release)
4.
INTERFACE DESCRIPTION
4.1
JSON Package
4.1.1
JSONProcessor
Class that will handle the program’s JSON related work, including the loading/saving of the files.

public LinkedList<WelshDictionary> load(File dictionaryFile) - Method for loading the list of
dictionary definitions from a JSON file.

public void save(File dictionaryFile, LinkedList<WelshDictionary> words) - Method for saving
the list of dictionary definitions to a JSON file.
4.1.2
WelshDictionary implements Comparable<WelshDictionary>
Class that will hold each word’s definition with all the necessary fields.

public WelshDictionary() - Default constructor for WelshDictionary.

public WelshDictionary(String english, String welsh, String wordType, Boolean practiceWord) -
Constructor for WelshDictionary that includes a full list of parameters.

public String getWelsh() - Getter method for the dictionary objects welsh variable.

public String getEnglish() - Getter method for the dictionary objects english variable.

public String getWordType() - Getter method for the dictionary objects word type variable.

public boolean isPracticeWord() - Getter method for the dictionary objects practiceWord variable.

public void setWelsh(String welsh) - Setter method for the dictionary objects welsh variable.

public void setEnglish(String english) - Setter method for the dictionary objects english variable.

public void setWordType(String wordType) - Setter method for the dictionary objects word type
variable.

public void setPracticeWord(boolean practiceWord) - Setter method for the dictionary objects
practiceWord variable.

@Override public boolean equals(Object obj) - Equals method for checking if two dictionary
objects are equal.

@Override public int compareTo(Object obj) - Method for comparing two WelshDictionary
objects, used for sorting the list of definitions alphabetically.
4.2
Self-Assessment Package
4.2.1
Question
Abstract class that holds general information such as each questions possible answers and also the correct
answer.

public boolean checkAnswer(String answer) - Method to check whether a given answer matches
the question’s correct answer.

public LinkedList<WelshDictionary> getPossibleAnswers() - Getter method for the question
objects possible answers.
4.2.2
AssessmentGenerator extends Question

public LinkedList<Question> generateAssessment(LinkedList<WelshDictionary> words) -
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.
Aberystwyth University / Computer Science
Page 6 of 19