I'm not sure if it's a drawback that you can't have public/private methods for the rectangle object or not. Smalltalk doesn't have such things either, but many other languages do. Anyway, the above works fine.

This implementation does not allow arbitrary rectangles in the plane. It is restricted to ones with sides parallel to the major axes. I am working on one that allows cockeyed rectangles. Was this feature intentionally left out?

Basically, you can give two parallel sides, or two intersecting (in the case of a rectangle perpendicular) sides. You then need "accessors" to compute heights and widths. Thus giving us two more ways to implement rectangles with the same area and perimeter calculations.