Implemented the square class.