Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

  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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

Describe important components of self-regulated learning.

Answered: 1 week ago