fixed error in switch case  in the getSquare Method