Added accessor functions

Added accessor functions for the dimension variables of the matrices
Added the const modifier to the consolePrint() and isValid() functions
as well as to the new accessor functions