Extensions
Deadline for Assignment 4: 4:00pm Thursday 19th January 2012
Extensions to the program can only be implemented once the basic
functionality has been implemented both in text and graphical modes.
-
a). Data files. Store the glossaries data separately from the program code. This can be done with a
text or XML file. Once you've implemented this there is no need to have glossary subclasses, additional glossaries could be objects rather than classes (this is a much more elegant and efficient way to implement the program by the way).
-
b). Include error handling capabilities to the program and
specifically to the module dealing with data files. Data file handling
is a part of a software system that needs exception handling. You can
read about error handling in Chapter 12 of the textbook.
-
c). Improve the structure of your program (in general) with
inheritance. One area of opportunity for improvement of this type is
the relationship between the part of the Reference class that deals with the application as such (for example the methods termExists, getTermDefinition, etc.) and the part associated with the user interface. One way to make this relationship more efficient is to declare Reference as an abstract class handling the application layer and two subclasses of it two implement the text and GUI user interfaces.
-
d). Implement the singleton design pattern so that there is
only one instance of lexicon at any time of the program
execution. Strictly speaking, this is not necessary for the program at
this stage, but if the lexicon were to be used by several classes at
different moments it would be convenient that there was only one
instance of this class in the program. You can read about design
patterns in general and about the singleton pattern in Chapter 13
of the textbook (or in a book about software design patterns).
-
e). Implement the observer design pattern so the internal model
of the application can be separated in a neat way from its
presentation on screen. This separation becomes an issue when the
application grows to such an extent that there is a high degree of
dependency between the objects of the program and events such as changes
of state trigger several notifications to and from these objects. You
can read about design patterns in general and about the observer
pattern in Chapter 13 of the textbook (or in a book about software
design patterns).
-
f). Include photos. Similarly to encyclopedias, definitions could have associated illustrations or photographs. This extension only has to work for the GUI mode.
These extensions do not have to be implemented in any order, although
the first one can be useful when implementing some of the others.
| Last updated at 9:07pm, Thursday September 22nd 2011 |
Dr Natalia Beloff (N.Beloff@sussex.ac.uk) |
|
|
|