Assignment 3 - A Spell Checker using string and istringstream

due October 15
This assignment is, for the most part, a repeat of the first assignment, using the string and istringstream classes.

Your program should adhere to the following specifications:

  1. All char arrays must be replaced by string objects. You are to use string functions, no functions from <cstring> (in, fact, there is no need to include this header file).
  2. You will not need a "Word" class. This is to be replaced by the string class.
  3. In your Dictionary class you should read in the words just like before, using your addWordToDictionary() and resize() functions.
  4. The Dictionary::find() should work logically, just as it did before, but, of course, you are dealing with strings.
  5. To perform the "spell checking", your approach will be different. You will read one line at a time from the input document (Martin Luther King's "I have a Dream" speech.). You need an istringstream object here. Each input line should be "parsed" to extract one word at a time for spell checking.
  6. You will remove leading and trailing punctuation, just as before, but, of course, you are using string functions to do this.
  7. There are additional "spell checking" requirements.
  8. Note: Use the input files provided (there is a new "word" file.
Program output
Dictionary resized to capacity: 16
Dictionary resized to capacity: 32
Dictionary resized to capacity: 64
Dictionary resized to capacity: 128
Dictionary resized to capacity: 256
Dictionary resized to capacity: 512
Dictionary resized to capacity: 1024
Dictionary resized to capacity: 2048
Dictionary resized to capacity: 4096
Dictionary resized to capacity: 8192
Dictionary resized to capacity: 16384
Dictionary resized to capacity: 32768

Spell checking /deanza/data/IHaveADream.txt

Line 4: withering not in the Dictionary
Line 5: captivity not in the Dictionary
Line 7: sadly not in the Dictionary
...
Line 97: beautiful not in the Dictionary
Line 107: heightening not in the Dictionary
Line 107: alleghenies not in the Dictionary
Line 108: snowcapped not in the Dictionary
There are ?? in the document.			<--- You figure out this number

ftp "word" file and "ihaveadream.txt" (this is a zip file)
Note: if you are unable to ftp these files, request them from the instructor via email.