This is an individual assignment, which you must complete in accordance with the instructions given in the Professional Conduct and Assignments sections of the Syllabus .
Design a KWIC Index system according to the requirements given in the Parnas papers "On the Criteria to Be Used in Decomposing Systems into Modules" (given on page 146 and refined on page 151) and "On the Design and Development of Program Families" (page 199). The system should not consider "uninteresting" circular shifts. Use the module specification approach based on the information hiding principle. Document the module structure and module interfaces precisely and completely.
You are not required to use the same modularization that is given in the Parnas papers. However, you are expected to have a modularization that is robust with respect to the possible variations that are likely among family members (pages 149, 150, and 200). In particular, you may want to use a higher-level interface for the Line Storage module. For example, you may want to reference line numbers and words within the line rather than characters within the line.
Develop the system as a family, providing for implementation changes and smooth replacement of modules. That is, alternative versions of a module should all implement the module specification with the required operation names, parameters, and behaviors.
To demonstrate the family, you are required to implement two significantly different versions by supporting (at least) two different approaches to (at least) one of the possible changes 2, 4, or 5 on pages 149-50 or the change discussed at the bottom of page 151. (The latter would involve replacement of both the Circular Shifter and Alphabetization modules.) Also the determination of which circular shifts are "interesting" and which are "uninteresting" should be easily changeable.
By default, you are expected to implement the system in an object-oriented programming language such as Java, C++, or Delphi Pascal. However, you may use other languages that have appropriate "module" facilities, but first ask the instructor's permission. The source code should be structured, formatted, and documented in a manner that is appropriate for the language and the module specification approach.
For the purposes of this assignment, assume that the input to the program consists of a file containing text. Each line of the text file is a line for the purposes of the system above. Assume that words are contiguous sequences of nonspace characters separated from other words by one or more space characters. The program should be developed so that the instructor can use it with his own input file.
Similarly, the output should be "printed" to a text file.
Of course, both the input and output formats should be "secrets" of appropriate modules in your design and implementation.
When this assignment is complete, submit the following items. Be sure that all items submitted are clearly labeled with your name and the assignment number.
It is possible that I will ask each students to review the design and implementation of other students. So develop your materials with that in mind.
Grading criteria shall include such aspects as:
UP to ENGR 660 assignments document?