Implemented the Rect class.