Assignment 2 from CPSC 221 course at UBC (Summer 2013)