CS2851 -- Lab 1: Spell Checker

Outcomes Addressed

  • understand and apply complex data structures and algorithms.
  • have a thorough understanding of commonly used library data structures.
  • be able to use data structures in software design and implementation.
  • be able to apply standard library data structures in software design.

Individual Assignment

This assignment serves as a prerequisite assessment for this course. Each student should must submit his/her own solution to this assignment.

Procedure

You are to create a program that allows the user to spell check text files. The program should ask for the location of a dictionary file (containing a list of correctly spelled words, one per line) and one (optional you may ask for more than one) target file to be spell-checked. The program should then list all of the words in the target file that are not found in the dictionary file.

Lookup Class

The Java Collections Framework contains a Set<E> interface and a ArrayList<E> class. You should create a class that extends the ArrayList<E> class and implements the Set<E> interface. Note that some of the methods defined by the ArrayList<E> class are defined differently in the Set<E> interface. For example, ArrayList<E>::add(E object) appends object to the end of the list whereas Set<E>::add(E object) adds object to the set only if it is not already present.

Spell Checker Program

Your spell checker program should make use of the Lookup<E> class to determine if words are spelled correctly. Your program should make use of the Set<E> interface when interacting with the Lookup<E> object.

The minimum requirements are listed above. However, 10% of your grade will be based on enhancements to your program. You may decide what enhancements to include. Some potential enhancements include support for:

  • uppercase and lowercase letters,
  • punctuation,
  • interactive spelling correction,
  • suggested correct spellings,
  • etc...

A sample dictionary file is available here.

Interim Report (due 11:00pm, Sunday of week 2 (9/14))

Indicate how much time you spend on this assignment in the FAST system. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent during the first week before the due date given above.

Lab Report (due 11:00pm, Sunday of week 3 (9/21))

Here is a template file to use as a starting point for this report.

Your report should include:

  • A discussion of the enhancements you chose to include.
  • Sample results: You should include the output produced by your program when lab1smple.txt is used as the input target file (and the dictionary file linked above).
  • The Documented source code for your program.

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost.

Also, indicate how much time you spent in week 2 on this assignment in the FAST system.

If you have any questions, consult your professor.

  • © 2001-2009 Dr. Christopher C. Taylor •
  • Office: L-343 •
  • Phone: 277-7339 •
  • npǝ˙ǝosɯ@ɹolʎɐʇ