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