Newsgroups: comp.lang.c++,comp.object,comp.theory,comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!howland.erols.net!torn!kwon!watserv3.uwaterloo.ca!undergrad.math.uwaterloo.ca!eadengle
From: eadengle@hoporoo.uwaterloo.ca (Ed "Cynwrig" Dengler)
Subject: Re: Opinions on Ellipse-Circle dilemma?
Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
Message-ID: <E5EMwz.74K@undergrad.math.uwaterloo.ca>
Date: Mon, 10 Feb 1997 20:43:47 GMT
Distribution: inet
References: <5d4fmf$7gk@bagan.srce.hr> <u8rvi86ntcx.fsf@miris10.leeds.ac.uk> <32FA2A1C.6B31@arscorp.com> <E5B2HH.8AH@ecf.toronto.edu>
Nntp-Posting-Host: hoporoo.uwaterloo.ca
Organization: University of Waterloo
Lines: 46
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:247011 comp.object:60978 comp.theory:17878 comp.lang.smalltalk:51363

Greetings!

In article <E5B2HH.8AH@ecf.toronto.edu>,
Patrick Doyle <doylep@ecf.toronto.edu> wrote:
>In article <32FA2A1C.6B31@arscorp.com>, Norman Bunn  <bunn@arscorp.com> wrote:
>>
>>It has to do with sub-classing.  In other words...
>>
>>Is an ellipse as specialization of a circle (having two foci) or is a
>>circle a specialization of an ellipse (having only one)?  Could we say
>>in a circle's case, that it has two foci like the ellipse and they are
>>just the same point?
>
>  Well, for my simplistic first impression, it seems to me that a circle
>IS_A elipse, but an elipse is not a circle.  What are the arguments in
>the other direction?  I'd descend circle from elipse.
>
> -PD
>
>-- 
>--
>Patrick Doyle
>doylep@ecf.utoronto.ca


CLASS Ellipse:
    METHOD setAxesLength( real major, real minor )

CLASS Circle: SUBCLASS Ellipse


A: Circle
B: Ellipse

A.Create
B := A
B.setAxesLength( 5, 10 )

Hmmmm, doesn't work too well does it?

The problem of matching subtypes is that you also match interfaces, which means
that any subclass better support what its superclass can be told to do.

Ed


