From: Martin DeMello Date: 2003-09-03T15:41:13+09:00 Subject: Re: OOP flavors - was Re: Python vs. Ruby Sean O'Dell wrote: > > The ATM knows nothing about the Customer object, it knows requests and > issuing money. The Customer object knows about the ATM, requesting > money and receiving money. I would write it like this: > > customer.requestMoneyFrom(ATM); > customer.receiveMoney(ATM.moneyHangingOut); money = ATM.get_money(customer.atm_validation) customer.receive_money(money) is how I'd do it. The ATM gives money to anything that has an atm_validation, and the customer receives money from anywhere. The money itself is attached to neither. martin