Added problem 3 to tex file and added more comments to part2.cpp