Refactored the code of PrintMatrix method