design question

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun May 13 10:40:16 EDT 2007


idaku2 at gmail.com a écrit :
> On May 12, 9:34 pm, Bjoern Schliessmann <usenet-
> mail-0306.20.chr0n... at spamgourmet.com> wrote:
> 
> 
>>In principle, this is legal.
>>
>>But OTOH, how could a ShoppingCart "buy" something? In my world,
>>Buyers "buy" when using ShoppingCarts.
> 
> 
> Yes, I don't know either.  I got this assignment for my homework, and
> in UML diagram class ShoppingCart has method buy(), and the class
> Buyer doesn't have any methods, only attribute ShoppingCart, and I
> must simulate/implement online shopping.  In my world buyers buy too,
> just wanna check with somebody with more experience.  :)

It's alas pretty common to see OO taught by persons who'd rather do some 
other job - preferably not related to computers.

> Thank you both.
> 



More information about the Python-list mailing list