Programming Assignment 2

Use template to create functions for programming assignment 2.