ITSE 2436 - Programming Fundamentals III Data Structures
Bob Comer, Professor of Computer Studies


Data Structures

General Program Requirements - Documentation and Style

1. The driver program for each programming project should begin with "header comments" containing:

For example:

// Programmer: Bob Comer
// Project Number: 1
// Project Desc: Quadratic Equations
// Course: Data Structures
// Date: Jan. 29, 2004

2. Use a standard indentation convention in your code (see examples in textbook).

3. Use meaningful variable names. Do not use global variables.

4. Most programming assignments in this course will require you to write a C++ class and/or use a class that is provided in the textbook. If an assignment requires a class or classes, the code should be split into multiple files as described in the textbook. The code for each class should be split into 2 files: a class header file (sometimes called the class definition file) and a class implementation file. The code for the application that uses the class or classes (sometimes called the client program) goes in a separate file or files. You should follow the convention that the class header file has the same name as the class and an extension of ".h". The class implementation file should have the same name as the header file and an extension like ".cpp" or ".cxx". See sections 4.2 and 4.3 in the Nyhoff textbook.

5. The class implementation file(s) and the client program file should be set up to compile separately. The example programs in the textbook that contain classes are all set up for separate compilation. Most C++ Integrated Development Environments will require that you set up a project for your program. You will need to find instructions on how to create a project in your IDE. Note: If your application program file has a #include for the class implementation file, you are NOT using separate compilation. See sections 4.2 and 4.3 in the Nyhoff textbook.

6. Do not include code in your class header file. The definitions for the class member functions should be in the implementation file. See sections 4.2 and 4.3 in the Nyhoff textbook.

7. Your header file should include documentation (comments) to describe your class. You must include preconditions and postconditions for each function declared in the class header file. See the description and example of a class header file in sections 4.2 and 4.3 of the Nyhoff textbook.

8. Only minimal documentation (comments) is needed for the implementation file and the driver program file.

9. Functions that are included with a class should always check the function preconditions if possible. Generally this means checking that the object that calls the function and any parameters supplied to the function do not violate the preconditions. The textbook tends to use if statements to test function preconditions and then prints an error message.

10. Program Test Data

Your program test data should not be hard-coded in your program. Your test data should be input from the keyboard or from an input file. This should make it easier to test your program.

11. Program Output

Your program should follow all program specifications. The program output should show that all functions work correctly. If exact output is not specified, please create output that is understandable and attractive.

12. Deliverables

The assignment deliverables will wary from assignment to assignment. For all assignments, you will be required to submit an electronic copy of all files that contain the source code for the program. Do not send me executable files, project or make files, object code files, etc.