homework problems from CPSC 524