Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!news
From: adrian@acm.org (Adrian Cho)
Subject: Interesting inheritance problem/survey
Message-ID: <CvGIIt.2t1@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: oti1.magna.com.au
Organization: Information Services, Sydney University, Sydney, NSW, Australia
X-Newsreader: WinVN 0.91.6
Date: Thu, 1 Sep 1994 15:18:28 GMT
Lines: 18

I am conducting as a matter of interest.

Here is an inheritance question that seems to provoke a lot
of arguments amongst OO-enabled programmers.

If you had to implement the geometric functionality of a square
and a rectangle in a class hierarchy how would you do it?
More specifically would if you had two separate classes would
you subclass Square from Rectangle or the other way around?
Or would you somehow do it with one class?

If you are not familiar with what I am talking about then look
at the Rectangle class in most Smalltalk implementations.

Please give the reasons the approach you would use.

Once a reasonable number of answers to this question have been
processed, the results will be posted.
