Completed the code for problem 1 and created template stubs for the other problems.