Back to TA Page

Mobius strip

Assignment 4

Chin's Assignment 4 webpage
Chin's Assignment 4 Q+A

Chin's solution: HTML version | Lisp version
My solution: HTML version | Lisp version

This assignment is out of 10 points. The following is how the grading breaks down.

Coding Practices (40%)

Documentation: 20%

  • author and (date or version or class+assignment)
  • description of program as a whole
  • description of each function/subroutine, including possible/required parameters and result returned (and any side effects)
  • brief comments on complicated lines/blocks code
  • in short, help others quickly find their way through your code

Formatting and good practices: 15%

  • use obvious/relevant names for variables
  • consistently indent blocks of code
  • keep lines short (less than 80 characters/screen width)
  • break up long chunks of code within a single subprogram into related sections by adding an extra line of white space between them (just like how you break up long passages of text into paragraphs)
  • break up your program into smaller, modular subroutines or functions when it makes sense to do so
  • in short, make your code itself easy to read

Usability: 5%

  • check spelling and formating of messages to the screen
  • make error messages informative
  • include adequate feedback to users of your program
  • catch errors whenever possible and fail gracefully
  • in short, make your program easy to use (as long as it doesn't conflict with assignment specifications)

Assignment Requirements (60%)

Classes: 10%

  • Has the proper classes and slots defined.

Print-object: 10%

  • Has the three required print-object methods, which should print in the specified format.

Compute: 15%

  • Has the 7 require compute methods (which should only setf if the new value is different from the old)
  • Has a setf :after method
  • Has a initialize-instance :after method

Interactive circuits: 20%

  • Has a half-adder (of an AND and XOR gate)
  • Has a full-adder
  • Has an sr-flip-flop

Miscellaneous: 5%

  • My gestalt impression: odds and ends, little bonuses and minor omissions, rewards for good clear code, minor penalties for major convolutions, other things that don't clearly fit in the above but still make a difference. (If you're missing a few, undocumented .1's, they probably came from here. Default value: 0.4)


Documenatation and good practices was pretty easy for most of you, since it was in the specs to include the :documentation tags.

Bonus points if you got everything right and followed the specs doing it.

One person produced code that caused the Lisp interpreter to dump core. ("The internal data structures in the running Lisp image have been corrupted and execution cannot continue.") This was impressive, though rather counter-productive.