Re: D5 - Class\Collection example??
- From: "alanglloyd@xxxxxxx" <alanglloyd@xxxxxxx>
- Date: Mon, 15 Oct 2007 05:58:26 -0700
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
.
- References:
- D5 - Class\Collection example??
- From: Don
- D5 - Class\Collection example??
- Prev by Date: Re: D5 - Class\Collection example??
- Next by Date: Re: Line too long ???
- Previous by thread: Re: D5 - Class\Collection example??
- Next by thread: buy cheap runescape gold on www.buy-runescape-money.com
- Index(es):