Re: Clean Object Class Design -- Circle/Ellipse

From: Mikito Harakiri <nospam_at_newsranger.com>
Date: Sat, 21 Jul 2001 18:09:42 GMT
Message-ID: <Gzj67.2209$ar1.6291_at_www.newsranger.com>


In article <3B592B47.40E4C48B_at_mindtap.com>, Marc Gluch says...
>
>Let I be the set of integers and R of reals. I is a subset of R
>(we are talking abstract types, not machine implementations - Date's data
>independence).
>Now consider algebras IA = <I, {+,*}> and RA = <R, {+,*}>,
>with the standard interpretation (specification) of summation and multiplication.
>Is IA a subtype of RA? Chris Date would have you believe so.
>But RA is a field, whereas IA is only a ring (and thus does nort preserve all
>properties of RA).
>In conclusion, we can't substitute integerobjects for realobjects in all programs
>written using realobjects,
>and if we try, some of these programs will break (namely these that rely on x * 1/x
>= 1).
>

No, RA is a subtype of IA, even though I as a universe of IA is a subset of R as a universe of RA. It is a set of operations that we want to subset, not the universe.

BTW, you could collapse your example further down to groups: then we come to octic group interpretation in square/rectangle case. Received on Sat Jul 21 2001 - 20:09:42 CEST

Original text of this message