For CPSC 310 Assignment 2 - Part 4