231 ICS202 Labproject Description
231 ICS202 Labproject Description
Follow Gradescope
22/10/2023 Grade scope 231
submission deadline
Lab Project
Design and implement a dictionary data structure. Your dictionary holds a list of words
(strings) to be used in a spell checker.
2. Add new word This method adds a new word (string) to the existing dictionary.
The suggested signature is
public void addWord(String s) throws WordAlreadyExistsException
3. Search for word This method searches for a word (string) in the existing
dictionary. The suggested signature is
public boolean findWord(String s)
4. Remove word This method removes a word (string) from the existing dictionary.
The suggested signature is
public void deleteWord(String s) throws WordNotFoundException
5. Search for similar words This method searches for words that are similar to a
given word s. By similar, we mean that the string s differs in exactly 1 letter only
with the words in the dictionary. The suggested signature is
public String[ ] findSimilar (String s)
For example, words similar to “puinter” are “printer”, “painter”, “pointer”, and
“punter” etc. Note that two similar words may differ in their length by 1 letter.
Notes:
1. You may use any data structure covered in the course. However, you have to only
use the classes that we have been covered in the course (e.g. MyContainer,
MyLinkedList, etc.)
2. No built-in classes may be used for the Dictionary data structure. In particular do
not use ArrayList<String> or any other built-in data structure from java.util.*.
4. Include a main method in your class to test all methods in the dictionary. The
following operations should be supported in the testing.
5. Include a text file “efficiency.txt” with your program giving the time complexity
of each of your methods in the dictionary as a function of n where n is the number
of words in the dictionary.
6. Submission details: Submit the java file(s) the text file, project report in pdf
through BB before the due date as a .rar file. You should Write your filename as
200######0.rar where 200######0 is your unique 10-digit id.