Re: Clean Object Class Design -- Circle/Ellipse

From: Bob Badour <bbadour_at_golden.net>
Date: Sat, 18 Aug 2001 09:56:55 -0400
Message-ID: <tCuf7.51$x67.15455276_at_radon.golden.net>


>> In "Type Inheritance: Is a Circle an Ellipse?" on www.dbdebunk.com
>> Date insists:
>> "As already indicated, it's my position that a circle categorically is
>> an ellipse in the real world -- to be specific, it's an ellipse in
>> which the two semiaxes coincide in the radius (equivalently, it's an
>> ellipse for which a=b). In my opinion, therefore, any "model" of
>> inheritance in which type CIRCLE is not considered to be a subtype of
>> type ELLIPSE can hardly be said to be a good model of reality."
>>
>> Is that a MAY (allow) or a MUST(require)?
>> Hint; what does *categorically* mean?
>
>The similar discussion was on "Is square a rectangle?" My conclusion was it
>totally depends on how you model the class hierarchy. For example if I
 model
>the Ellipse class like the following:

Have you read Date's essay? He discusses the distinction between values and variables. Circle values are ellipse values; circle variables are not ellipse variables. Received on Sat Aug 18 2001 - 15:56:55 CEST

Original text of this message