Add matrix class for assignment 7 and 9