assignment 5, part 1, source code and graphics