Homework Assignments

Date Due date Topic Materials Solution
10/22 10/28 Functions, Recursion, Control Structures, Basic Types Collatz.scala, Rotate.scala solution_week1.tgz
10/30 11/04 OOP: Objects, Classes, Methods, Inheritance AquariumSimulator.scala
(Updated)
solution_week2.tgz
11/6 11/11 Higher-Order Functions Part2.scala solution_week3.tgz
11/14 11/18 By-Name Parameters. Pattern Matching and Case Classes. Packages. cards.tgzsolution_week4.tgz(updated)
11/21 11/30 Maps. Traits. solution_week5.tgz

Final Exam

The final exam (take-home) is available on Courseworks!

Homework Submission Instructions

Place the files for all problems in a directory named [your_uni]_week[X] , where X is the number of the problem set. For instance if your uni is xy1234 and you are submitting the problem set for the first week, the directory should be called xy1234_week1. Either zip or tar and gzip the directory (using tar -c xy1234_week1 | gzip > xy1234_week1.tgz ) and upload it to the directory for problem set X on the Courseworks page for this class.

General Homework Guidelines

  1. Late policy: Absolutely no late submissions will be allowed (unless in unusual circumstances with prior instructor approval).
  2. Document your code! Undocumented code will result in lower scores, as will code that does not follow style guidelines.
  3. Make sure your program implements any specific functionality asked for (input/output format etc.).
  4. Efficiency of your implementation matters unless specified otherwise.
  5. You should be able to solve all problems without using any packages other than those mentioned.

Academic Honesty Policy

All problems must be solved individually. While there is a lot of useful material online that you can use as a reference, you are not allowed to copy literal code and solutions. You may discuss problems with other students, but you have to do the write-up and implementation yourself. Violations of this policy will result in a grade of zero and further steps may be taken in accordance with the CS department's academic honesty policy.