Homework 4 for UofA CSCE 2014