page16
Software Engineering Group Project 20: Design Specification/1.0 (Release)
5.1.10
Use Case 8 Change word ordering
Figure 11: Sequence diagram for changing the ordering of words
5.2
Significant Algorithms
5.2.1
JavaFX screen switching algorithm
All JavaFX screens will be loaded in at runtime and switching will be achieved by calling a method in the
JavaFX control class which takes the name of the requested screen as an enumeration and handles preparing the
screen and finally puts it on the stage.
5.2.2
Live-searching algorithm
The live-search shall be achieved by modifying the equals method to consider the length of input strings,
therefore allowing search to match strings which haven’t been fully entered yet.
5.2.3
Adding words algorithm
Each new word added will create a new WelshDictionary object, constructed using the Welsh, English and word
type to populate the instance variables. This is then added to a list data structure, which is then used by other
modules of the program for displaying, practicing and testing words with the user.
5.2.4
Saving algorithm
The saving shall be performed at the closure of the program, this will be completed through the use of the
Jackson library, this provides a simple way of encoding the data in the program into JSON. This is then written
out to a flat file.
Aberystwyth University / Computer Science
Page 16 of 19