School of Engineering and Applied Science
Department of Computer Science
CSci 133 -- Algorithms and Data Structures I
http://www.seas.gwu.edu/~csci133/fall03
Prof. Michael B. Feldman
mfeldman@gwu.edu

Preparation and Grading of Programming Projects:
the Importance of Professionalism

Fall 2003

Introduction

This course is taught under the assumption that the students have a semester's experience with programming and program design, equivalent to CSci 53. Projects are of a difficulty and complexity that someone at this level can reasonably be expected to handle.

It is, however, important for you to realize that one of the purposes of this course is to help you begin your preparation for a profession. If you are a major in Computer Science, you will find that your experience here will serve you well. Even if you never take another course in computing, you will have learned much about the kinds of techniques professionals use and especially about the courtesy that they are expected to show to others needing to read and understand their work.

The conventional scheme used in universities to assess a student's accomplishments is the grade. We therefore use a grading system to assess your success not only in writing a program that "works," but also in completing a project that meets the standards of professionalism we have set. Meeting these standards is neither especially difficult, nor especially burdensome in terms of your time.

We hope that you will realize that we are not just being bureaucratic, and that you will understand the benefits of what we are asking you to do. In any event, we are giving you, through the grading system, a tangible incentive to do it.

Project Grading

Your grade will be assigned on the basis of 20 points; partial credit is always given where appropriate. Unless otherwise specified, here is the grade allocation. See Project Preparation below for more details. Note that complete and correct user document(s) and test plan(s) will earn 50% of the grade, even if you do not complete the program(s), and that correctly developed and formatted program(s) will earn an additional 20%, even if not everything works. This weighting of grades is quite intentional, and is typical of modern computing courses. It is also typical in industry for the coding part of a project to absorb only 30% of the resources.

Schedule

Your project is due on the assigned date at the beginning of class. This is to encourage you to finish your project before class, not to skip class to complete it. A project brought in during the class will normally be counted as late.

Many teachers refuse to accept late projects at all, but in this course you are permitted to turn in projects at any time. Your grade on the project will, however, be reduced by 4 points, or 20%, for each week it is late.

Note that if you are extremely busy, you can buy an additional week of time for a 4-point price. You do not need permission to do so; just turn it in late. The "lateness fee" will be waived only for documented medical situations or other unusual circumstances. "The computer was down" is not an unusual circumstance; our response will always be "the computer often goes down; you should have allowed yourself more time."

Project Preparation

The grader will approach your project in the following order:
  1. Read the User Document(s) to see just what your project is promising to deliver.
  2. Read the Test Plan(s) to see how you have planned to demonstrate that your project delivers on its promises.
  3. Read the Test Output to see whether, indeed, the actual test followed the plan, and whether the program behaved as the test plan anticipated.
  4. Read your listing files to assess the general quality and style of your code.

About User Documents

You are developing two types of software in this course. Most projects call for both types.
  1. general-purpose, reusable software components, which Java calls classes
  2. end-user programs
Type 1
Who is the user of type 1? Another programmer.

What should that person's user guide be?

A javadoc page, with pre- and post-conditions included, is a good start, isn't it? It lists all the public methods (operations) syntactically, and the pre- and post-conditions describe the semantics of each method (operation). This document serves as the contract between the component developer and the client-program developer.

Should a user guide be more than this? Well, maybe there are some additional things you want to tell the programmer, but these can be brief annotations to the contract. The contract should not normally describe anything about the internals or implementation of the package. Indeed, in a business situation, in which you were selling or licensing your component to other developers, these details would often be considered confidential trade secrets! In any case, the client programmer should be able to learn how to use your component without knowing the details.

Type 2
Now who is the user of type 2? An end-user -- a payroll clerk, personnel manager, university administrator, airline reservationist, etc. This person needs to know:

HOW DO I USE THE PROGRAM?

Nothing more. Nothing about the packages, nothing about the internals. Just

A Type 2 User Guide should be brief and to the point, telling users just what they need to know, without telling them things they don't need to know. Think of this as similar to the user manual for any product you buy. Simple products have simple manuals; complex ones have complex manuals. The best ones make it a pleasure to use the product.

About Test Plans

Type 1

The main question you should ask yourself in starting to develop a test plan is "suppose I were going to spend a lot of money to buy this component for use in a critical system. What would I need to know about the component in order to be certain that the results I get from it are reliably correct? How can I have confidence that I am getting my money's worth?"

In testing a component, we need to answer these questions:

Putting this differently, we are testing to make sure that if the preconditions for each operation hold before we call the operation, then the postconditions hold after the operation is called.

For example, if you're testing an arithmetic operation for some new data type, can we validly use the result of an addition as the input to a multiplication? Are you sure? Have you tested this?

Another example: if you're testing an input/output component providing an operation that writes a structure to a file, and another that reads the same kind of structure from a file, can the read operation validly read a structure that the write operation wrote? Are you sure? Have you tested this?

Choosing tests completely at random will not necessarily test all these conditions. Make a table of test cases that will do so. In each case we indicate what the test values are, why we chose that particular test, and what we expect the result to be.

Type 2
In writing a test plan for an end-user program, pretend you are such an end user. You would want to know whether everything promised in the User Guide is delivered in the program. Develop a test plan that demonstrates to a skeptical user that the program "works".

Project Submission

You must submit your projects are in paper form, because the grader will need to make notes on them. There are just too many students to make e-mail submission practicable. Be sure your name and lab section are on each piece, in case they get accidentally separated. If a given piece has multiple pages, staple these pages together. Put the pieces together with a paper clip, not a staple.

We try to grade project carefully and thoroughly, to give you proper feedback and a fair grade. To help us do this, you must organize your project courteously, so the grader can read it in the order spelled out above. Accordingly, your submission must contain, in the following sequence:

  1. A cover page, printed from a computer or neatly hand-written, giving your name, e-mail address, lab section, project number, and date submitted.
  2. A copy of the project handout.
  3. A table of contents (TOC) page, printed from a computer or neatly hand-written. The TOC must list each additional document or listing, in the sequence in which it is included. It is not necessary to number each page, only to give the various pieces in their proper sequence.
  4. For each class you developed, completed, or modified in this project:
    1. An online javadoc page, and a test plan for the class which is printed from a computer or neatly hand-written. The document must show, on the first page, your name, e-mail address, lab section, project number, date submitted).
    2. One or more compile/execute scripts, according to the assignment sheet. Your test runs must show that the programs were executed according to your test plan.
    3. Compilation listing (.txt) files, showing the package spec and body, any SEPARATE subunits, and any test programs you wrote or used to test the package.
  5. For each end-user program you developed or modified in this project:
    1. A user guide and test plan for the program, printed from a computer or neatly hand-written. The document must show, on the first page, your name, e-mail address, lab section, project number, date submitted).
    2. One or more compile/execute scripts, according to the assignment sheet. Your test runs must show that the programs were executed according to your test plan.
    3. The listing (.txt) file for that program.
Do not submit printouts of source files, only listing files. Listings serve as an official record of compilation. If you were unable to complete all compilations without errors, turn in those listings anyway, so you can get partial credit.

Do not submit listings for classes or applications that were distributed to the class, and you just used without making any changes to them. On the other hand, if you are just using a distributed test program, submit a listing for it so the grader can see just what was tested.

Each program file must have, at the top of the listing, a "banner comment" in the following form:

//-------------------------------------------------------------
// Name: Danny Quayle
// E-mail Address: dquayle@gwu.edu
// CSci 133-10
//
// Project #1
// Date: September 22, 2003
//
// Brief Project Description:
//
// This project simulates a game of ten-pin bowling.
// A game is played by up to four players; a box score
// is displayed after each frame.
//
//-------------------------------------------------------------
Indentation and comments in the program should follow the style of those in the book and other example programs. Use comments to document each identifier.