Re: design question

2007-05-12 Thread idaku2
On May 12, 9:34 pm, Bjoern Schliessmann 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

[Newbie] design question

2007-05-12 Thread idaku2
Hi all Suppose I have class ShoppingCart which has one method called buy(), and class Buyer who has one reference to ShoppingCart... Can I also have method buy() in class Buyer, which will then called ShoppingCard.buy(), and also do some other stuff? Is this legal design pattern, have methods wi