From: Mark Wilden Date: 2008-05-25T22:42:03+09:00 Subject: Re: How to model something --Apple-Mail-1--659972246 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit > > Hi, > my programm needs to store persons. They have a weight and a gender. > You > are only allowed to ask males for their weight, females will throw > dishes/exceptions. There *is* a method to change someones gender. > > I could have 'if gender' in every accessor That seems like the simplest approach. The person object is the one who's creating this restriction - weight shouldn't know about gender and gender shouldn't know about weight. Wouldn't that only affect one accessor - weight? ///ark --Apple-Mail-1--659972246--