Home-->Assignments-->Assignment-1
 | Specification | Download | Solution approach | Extensions | Submission | Solution |

The starting program

Deadline for Assignment 1: 4:00pm Thursday 17th November 2011

The starting program is basically the same as the starting program of exercise k) of the Glossary exercises (it is highly recommended to complete the previous exercises before downloading the starting program for the assignment). This program comprises 5 classes: Glossary, Term, Lexicon, WordDistance and EasyIn. Glossary uses Term, Lexicon and EasyIn and Lexicon uses WordDistance. Glossary has a list of terms and provides functionality for creating terms, looking for terms and creating a lexicon from these terms. Term is a container for the term's label and its definition. Lexicon has a list of words and provides functionality for searching and adding words as well as calculating similarity between words. WorDistance is a container to record similarity between words. Finally, EasyIn is an auxiliary class for reading user input from the terminal.

On executing the method interact in the Glossary class you will notice that this program has a very simple interaction with the user. When the user inputs a term, the program simply responds whether the term is in the glossary or not. The interaction finishes when the user enters the special term `finish'.

It is advisable to take the provided program as a starting point for your implementation. This will make it easier for you to follow the proposed solution approach. You can download this program from the following link.


Last updated at 8:22pm, Thursday September 22nd 2011
Dr Natalia Beloff (N.Beloff@sussex.ac.uk)