CSE687 - Object Oriented Design

Design Note #2 - Package Structure is Important

A package is a small piece of code focused on a single activity, e.g., it is cohesive. In order to test and extend packages, designers need to understand their operations, and so spend a lot of time reading their text. To support this study, we will structure our packages so that:
image file not found

C++ Package Structure


Example:

The tokenizer package (Tokenizer.h and Tokenizer.cpp) from the Parser Demo is a good example of a well structured package.

Conclusions for: Package Structure is Important!

A published package contains:
  1. Header file with: preprocessor compilation guards, prologue, manual info, maintenance info, and service declarations.
  2. Implementation file with: prologue, include statements, service implementation, and construction test stub with a compilation switch.
All of the reusable modules provided for your use in our website follow this format, as your submitted code must, as well. Demonstration code, intended to illustrate some idea, but not intended for reuse will follow a much simpler format.