Written-Homework Guidelines, CSE373 Winter 2014

For written homework assignments, typed assignments are preferred. Handwritten is also fine, but it is often more difficult to organize your work clearly and legibly so that the TA can give a good grade. Writeups for programming projects must be typed and turned in electronically.

Some problems on the written assignments ask you to give an algorithm to solve a problem. Unless the assignment specifically tells you to implement the code and run it, pseudocode is acceptable. Pseudocode means that you do not need to write every line in Java with correct syntax; English explanations of operations are acceptable. The general rule you should follow is that you can substitute English for any O(1) operation, but not for more complex steps. Thus, the following would not be acceptable:

  scan the list and count all elements greater than x

while the following would be acceptable

 int counter // keeps track of number > 0
 while list has more elements {
    increment counter if current element is greater than x
    move to next element of list

The idea is that you do not need to give all the nitty-gritty coding details (that is the purpose of the programming assignments), but you should demonstrate a clear understanding of what your algorithm does and where those nitty-gritty details would need to be.

For the purposes of our homework, when in doubt, more detail is probably better than less detail. Another way of thinking about this is to write your answer in code, but we will not take off points for syntax. A common mistake for students to make is to use a phrase in pseudocode that is too vague without realizing it. In the example above, defining the variable counter helps the grader determine what you are incrementing. A more vague description would be:

  for each element of list, add to a count if it is greater than x

Among other things, the meaning of it is not clear.

Valid CSS! Valid XHTML 1.1