completed cachematrix assignment

Completed programming assignment 2.