From: Raymond Toy
Subject: Non-standard method combination examples?
Date: 
Message-ID: <4npv836snu.fsf@rtp.ericsson.se>
In Graham and Keene, there are a couple of very brief examples of
non-standard method combination.  In particular, both use the method
combination +.  

Graham basically has two classes jacket and trousers.  The price
method on each returns the price.  Then he has 

(defclass suit (jacket trousers) ())

Then calling (price <suit-instance>) returns the sum of the price of
jacket and trousers.

This all makes sense to me, but is too simplistic for me to really
extend this to something more complicated and useful.  Besides, to me,
a suit doesn't satisfy the isA relationship for a subclass of jacket
and trousers; a suit hasA jacket and trousers.  

Keene has something similar about electricity for regions and cities,
which makes a bit more sense to me, but is still too simplistic for me
to extend.

Are there any relatively straight forward examples of non-standard
method combination that I can look at?  I just want to learn; I'm not
currently looking to do anything in particular.

Thanks,

Ray