Re: D5 - Class\Collection example??



On 13 Oct, 21:41, Don <don81846<NODAMSPAM>@earthlink.net> wrote:
Could someone please point me to, or post, a very simple code example
of a class heirarchy. Something like a person class that has a
collection of wives that each have a collection of addresses, etc.


This is really almosrt a database question rather than an OO question.
As an OO question I would expect the TPerson would decscend to
TFriend, TSpouse, TAcquaintance, TChildren, TAffairPartner etc.

If you're talking about a parent object with descendant items you
could use the existing TCollection plus TCollectionItem paradigm. And
of course one could write a descendant of TCollectionItem which holds
a collection of TCollectionItemItem for that TCollectionItem.

Normally the collection holds properties and methods for dealing with
the whole, while the collectionitem holds properties and methods which
deal with the individual items.

Alan Lloyd

.