Question: Dictionary.java DictionaryInterface.java Spell.java SpellCheck.java In this lab you will write a spell check program. The program has two input files: one is the dictionary (a

 Dictionary.java DictionaryInterface.java Spell.java SpellCheck.java In this lab you will write a

  1. Dictionary.java
  2. DictionaryInterface.java
  3. Spell.java
  4. SpellCheck.java

In this lab you will write a spell check program. The program has two input files: one is the dictionary (a list of valid words) and the other is the input file to be spell checked. The program will read in the words for the dictionary, then will read the input file and check whether each word is found in the dictionary. If not, the user will be prompted to leave the word as is, add the word to the dictionary or type in a replacement word and add the replacement word to the dictionary if it is not currently contained in the dictionary Dictionary The Dictionary will have a field to hold the words; the type of this field will be an ArrayList of Strings. Create the following interface and use it when implementing the Dictionary class. public interface DictionaryInterface t void addword (String word); //adds a new word to this dictionary boolean isWord (String word); //returns true if word is in the dictionary and false otherwise int getSize); String toString /umber of words in the dictionary //return String of dictionary words The toString) method should return a String with each word on a separate line. Create a constructor with one parameter, a Scanner object which points to the file containing the words for the dictionary. The constructor will read the words, and store them in the Dictionary. Remember there is one word on each line of the dictionary file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!