Posting the completed RandomRectangle code