[Tutor] designing POOP

Tiago Saboga tiagosaboga at terra.com.br
Wed Feb 6 01:43:34 CET 2008


On Tue, Feb 05, 2008 at 08:02:19PM -0000, Alan Gauld wrote:
> "bhaaluu" <bhaaluu at gmail.com> wrote
> 
> > Now I am interested in learning how to DESIGN an object-oriented 
> > version

The question was very interesting, and so where the answers.

> Don't at this stage worry too much about inheritance.
> Focus on function. If you find that several classes have
> the same or similar methods then consider if they are
> sub types of an abstract superclass. Do NOT use data
> attributes for this, always base inheritance heirarchies
> on behaviour.

Could you please elaborate on this last sentence? I don't understand
what you mean, and I feel I may be on this track.

Thanks,

Tiago Saboga.


More information about the Tutor mailing list