CS135 Sample Solutions

Preparing Sample Solutions

We typically release sample solutions for each assignment after the deadline (typically the following day). These will either be prepared by ISAs or the instructors (this should be discussed and decided at the beginning of term) but should be proofread by both ISAs and instructors before posting. These solutions should follow the style guide, and should be correct (passing all correctness tests and including all required check-expect cases). There are often many approaches to solving assignment questions, so the sample solutions should highlight the cleanest, most direct approach so that students can understand and learn from the solutions. We do not post sample solutions for the bonuses, as these tend to be re-used from year to year.

Posting Sample Solutions

Sample solutions for CS135 are compiled into a single aXX_soln.pdf file and made available for students to download from the course website. When a student requests a solution set, protectPDF/watermarkalt.sh will add a watermark of the student's userid to the pdf, and we save a record of the request in protectPDF/log.txt. This lets us track who has accessed the solutions, and, if solutions are being distributed around the internet, we can track down which student distributed these solutions. Sample solutions should be posted the day after the assignment is due and the process is as follows:

  1. Prepare sample solutions as described above.
  2. Compile code from all question files into a single aXX_soln.rkt file. It helps to include a header for each assignment question that labels where each new question begins (similar to what the style guide suggests students do in their submissions).
  3. Create an aXX_soln.pdf file from aXX_soln.rkt (in DrRacket, File->Print Definitions and then print/save to PDF). DrRacket will create a pdf that looks exactly like what the editor shows for your file. Any black highlighting, highlighted selections, or flashing insertion points will be included in the created pdf. Be sure to double-check the pdf after it has been created to make sure nothing unintended has been included.
  4. Put the created aXX_soln.pdf in the course account under protectPDF/aXX_soln/aXX_soln.pdf. Ensure both the aXX_soln directory and the aXX_soln.pdf file have 710 permissions (rwxr---- or rwxr-s---).
  5. Edit protectPDF/config.php to include an entry in $file_list for the assignment. This typically means uncommenting a line like " 'aXX_soln'=>'Assignment XX Solution',".
  6. Double-check that the solutions are properly accessible from the webste, https://student.cs.uwaterloo.ca/~cs135/assess/solutions/

-- Ben Hicks - 2020-12-23


Topic revision: r1 - 2020-12-23 - BenHicks
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback