Xref: utzoo comp.lang.eiffel:1394 comp.object:2536 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!umich!dgsi!dbc From: dbc@cimage.com (David Caswell) Newsgroups: comp.lang.eiffel,comp.object Subject: Re: Inheritance and Information Hiding Message-ID: <1991Feb8.154032.7277@cimage.com> Date: 8 Feb 91 15:40:32 GMT References: <488@eiffel.UUCP> <27A86309.281A@tct.uucp> <1991Feb1.135956.12425@tukki.jyu.fi> <27ADD06B.46A3@tct.uucp> <1991Feb5.130359.9735@bellcore.bellcore.com> <1991Feb6.045542.791@visix.com> <1991Feb7.151212.25200@bony1.bony.com> Reply-To: dbc@dgsi.UUCP (David Caswell) Organization: Cimage Corp, Ann Arbor, MI Lines: 13 .>We know how to add vertices to POLYGONs. I think it ridiculous to say .>we do not know how to add vertices to RECTANGLEs. The problem is, .>adding a vertex to a RECTANGLE gives us something that is not a .>RECTANGLE. .> I don't think that we know how to add vertices to all POLYGONs. Rectangles for example. I think the solution is to put the rectangle methods on polygon and have them assert that the number of vertices equals 4. They could be put in another file or whatever if you're worried about readability. This problem comes up in countless situations. Unfortunately there is not a perfect solution.