Lab Assignment #6

Due Thursday, August 14 at the beginning of class

The assignment is to write a spell-checking program in C++. The program will prompt the user for 3 different filenames. The first prompt is for the name of a file to be used as the dictionary. The second prompt is for the name of the file that contains the words to be checked. The third prompt is for the name of an output file. The output file will contain the results of the spell-check. This is a sample of what your program should look like when it is run:
   Enter the name of the dictionary file: lexicon.txt
   Enter the name of the file to check: fruits.txt
   Enter the name of the file to write the output: program6.out
You must follow this format exactly. I will be using an automated script for all prompts.

Details Here is a sample of what the contents of the three files might look like:

  Dictionary               Input file                    Output file
(lexicon.txt)             (fruits.txt)                  (program6.out)
-----------------------------------------------------------------------------------
pear banana               apple               Not found: pearh
peach pineapple           pearh               Not found: bananna
mango apple lime          bananna             Not found: peech
lemon                     peech               Not found: plum
orange                    pineapple           Not found: manog
grapefruit                plum                Not found: grapefroot
avocado                   manog
grape                     LEMON               Number of words not found in dictionary: 6
                          LIME
                          grapefroot

How to submit your programs

Back to Outline