Did the Assignment 2

modified the vector example to solve the assignment. added comments.