completed ProgrammingAssignment2

uploading completed code