A Text Analyzer

Write a program to read any text file and print out a table listing the frequency of occurrence of each letter of the alphabet. The program should also print a count of all the non-alphabetic characters in the file, including blanks, and the text itself.

Procedure

  1. Write a one or two sentence problem statement.
  2. Write a problem description, including any aspects of the problem that you consider important. You will want to treat the input file as a number of lines, each with a number of characters.
  3. Draw a TDSR diagrm for your design that can be easily translated into procedures for your Pascal program. You will need to develop a strategy for the problem in order to draw this diagram.
  4. Write and compile the program.
  5. Consider how to test this program, and write a brief description of your test suite. Refer to the Testing handout for this. You will need several test input files corresponding to (a) special cases, (b) extreme cases and (c) representative cases. Think about line length, and file length, and whether word length is relevent.
  6. Test you program on each of you chosen test files and print out the results. Use a text output file to do this, as shown in the program output handout.

Hints


Deliverables

  1. Your design document (problem statement, description and TDSr diagram).
  2. A printout of your program source code.
  3. A description of your test suite, with printouts of your test files.
  4. Printouts of your program running on each of the test files.

Due Date

Hand in your documents to me (RTH) on November 6th. before 5:00 pm.