programming assignment 2 first check-in

completed code ready for check-in
programming assignment 2 second check-in

edited some typos in comments