CS286 -- Lab 1: Prerequisite Assessment



->Courses
->CS286
-->Homework
-->Quiz 1
->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
->Electronic Submission
->MSVC++ Info
->STL Info
->MFC/GUI Info
->Tentative Schedule
->Course Policies

[Courses]
[Unix][Home][Photos]
[PHome]

Spring Quarter 2000

Purpose

The purpose of this lab assignment is to review concepts from previous courses. This is accomplished through designing and implementing a C++ program to spell check text files against a dictionary file containing correctly spelled words.

Assignment

In order to do this assignment, you will need to download two files:

  • words.txt contains a listing of correctly spelled words.
  • example.txt contains a short paragraph of text.

You should write a C++ program that identifies any words in the example.txt file that are not contained in the list of correctly spelled words (words.txt). In the process, you should create at least one class. Be sure to consider which type of data structures are most appropriate for this assignment.

Programming consideration: It is always good in program design to consider potential modifications that may be required a some later date. Be sure to keep this in mind when designing your program. Think about what additional things you might want a spelling program to be able to do.

Program Extras

This assignment is designed to assess the level at which you have mastered much of the prerequisite material. Some of you may find that the assignment does not provide a significant enough challenge. There are a number of ways in which you can expand this assignment to make it more interesting. Here are a few ideas that you may decide you would like to implement:

  • Spell correction -- allow the user to input the correct spelling of the word that was misspelled (or choose not to change the word).
  • An additional user dictionary -- allow the user to add correctly spelled words that are not in the dictionary.
  • GUI -- a graphical user interface using MFC.
  • Spell checking in context -- display the misspelled word in the context of the text file you are spell checking.
  • Global ignore/replace -- allow the user to treat all additional instances of a misspelled word in the same way.

The list above is not meant to be exhaustive, feel free to enhance your program with any other features that you would like your spelling checker to have. However, please keep in mind that you should meet the minimum assignment requirements before adding additional components.

Intermediate Lab report (due 11:00pm, the day prior to week 2 lab)

The intermediate report should consist of your class declarations and a brief discussion of your reasoning for defining the classes as you did.

Lab report (due 11:00pm, the day prior to week 3 lab)

The lab report should be self-contained. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:

  • Purpose
  • Problem Statement
  • Procedure -- what approach you used to solve the problem
  • Documented source code
  • Discussion (include your program output (the misspelled words), the reasons for defining the classes as you did (from the intermediate lab report), any problems you encountered, etc...)
  • PSP level 2.0 documentation (this may be submitted in hardcopy at the beginning of lab)
  • Conclusions (what you learned, suggestions of how the lab could have been better, things you would have done differently, etc.)

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 sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

If you have any questions, consult the instructor.

Office: CC-27C, Phone: 277-7339
Last Updated: April 14, 2000
© 2000 Dr. Christopher C. Taylor