Re: Clean Object Class Design -- Circle/Ellipse

From: Graham Perkins <gperkins_at_dmu.ac.uk>
Date: Tue, 09 Oct 2001 14:41:35 +0100
Message-ID: <3BC2FE8F.A3D1E714_at_dmu.ac.uk>


"James A. Robertson" wrote:
> > How does Smalltalk:
> > * allow me to declare circle as a subtype of ellipse?
>
> I subclass Circle from Ellipse
>
> > * allow me to send the setFoci message to ellipse variables (that
> > incidentally contain circle values) with two different focal points?
>
> I override the methods in the subclass so that each gets appropriate
> behavior. If the ellipse variable contain circle values, ,my
> application code is wrong>
>
> > * prevent me from sending the setFoci message to circle variables?
>
> See above.

James, please stop patching up his daft questions. There is no such thing as an ellipse variable in smalltalk. Received on Tue Oct 09 2001 - 15:41:35 CEST

Original text of this message