>>> from rectangle import Rectangle >>> from point import Point >>> r1 = Rectangle(Point(-1, 2), 50, 100, (0, 255, 255)) >>> r1.width 50 >>> r1.height 100 >>> str(r1.center) 'Point (-1, 2)' >>> r1.color (0, 255, 255) >>> str(r1) 'Rectangle center is Point (-1, 2), width is 50, height is 100' >>> d = r1.to_dict() >>> d == {'center':{'x':-1, 'y':2}, 'width':50, 'height':100, 'color':[0, 255, 255]} True >>> r2 = Rectangle.from_dict({'center':{'x':2, 'y':-5.5}, 'width':70, 'height':45, 'color':[0, 255, 0]}) >>> r2.width 70 >>> r2.height 45 >>> r2.color (0, 255, 0) >>> str(r2.center) 'Point (2, -5.5)' >>> r2 != r1 True >>> r3 = Rectangle(Point(-1, 2), 50, 100, (0, 255, 255)) >>> r3 == r1 True