Programming Assignment2

code reviewed and updated