Final Programming Assignment No 2

Added comments to the functions.