This page outlines our expectations for your assignments. The grading scheme will follow these points closely.
Every program should be documented with
A contract, which is a comment documenting the type of the inputs and outputs of the program.
A purpose statement, which is a comment describing what the program computes.
A list of the test cases on which you ran the program. Write your test cases as a series of calls to your program. You do not need to include the results of the tests in what you submit. The graders will be checking the quality of your test cases (do you have too few, too many, sufficient variety, etc).
See the documentation example for a sample contract, purpose, and test cases. Many other examples will be given in class.
Whenever your program consumes or produces a compound form of data (structures, lists, etc) you must write down a data definition and examples of the data. A data definition is a comment describing the structure of the data and the types of its pieces. The examples of data are Scheme expressions that build instances of the data type you have defined.
See the data definition example. Many other examples will be given in class.
You should use appropriate types for your data. For example, if the problem statement suggests boolean data, you should use booleans rather than 0 and 1.
Your programs should follow the templates for the types of data on which they operate (this point will become clearer in the second week of class when we discuss data templates).
See the templates example. Many other examples will be given in class.
You should use helper functions appropriately. In general, use helper functions to
Your code should be readable, with proper indentation and line breaks (lines that don't wrap around). DrScheme will do proper indentation for you automatically (but not line breaks).
Unless otherwise noted, do not add error-handling to your code. Assume that your programs are run on data that conforms to their contracts. (Obviously, real-world programs do need to include error handling, but this course will not discuss MzScheme's exception mechanism, which is the proper way to handle errors.)
Your graded assignments will be marked with the identity of the grader who graded them. Talk to the grader first. If you still have a concern over your grade, talk to the professor. In both cases, be prepared to explain why you feel your solution deserves more points than it received.