Re: D5 - Class\Collection example??
- From: Hans-Peter Diettrich <DrDiettrich1@xxxxxxx>
- Date: Sun, 14 Oct 2007 18:21:46 +0200
Maarten Wiltink wrote:
The social consequences of this code are left as an exercise to the
reader.
IMO this is the point that makes it really complicated. When a partner dies, will it be wiped out, or will it stay in the history? What after a divorce, will it be allowed to marry the same partner later again? What if the real parents are unknown, or differ from the current caretakers (adoption...)? Are multiple marriages legal, what when illegal bigamy is found out?
In the basic model a collection of partners (children...) can be implemented, with the desired filtering in derived classes. Then the base class has to check only for Self and IsPartner, before adding an new partner to the collection. The IsPartner method might take into account the current date, date of marriage, and date of divorce, so that it will be possible to add the same partner later again.
One also could implement a bureaucracy (object), which determines whether a relation is legal, and updates the partners' records appropriately.
DoDi
.
- Follow-Ups:
- Re: D5 - Class\Collection example??
- From: Don
- Re: D5 - Class\Collection example??
- From: Jamie
- Re: D5 - Class\Collection example??
- References:
- D5 - Class\Collection example??
- From: Don
- Re: D5 - Class\Collection example??
- From: Tom de Neef
- Re: D5 - Class\Collection example??
- From: Maarten Wiltink
- D5 - Class\Collection example??
- Prev by Date: buy cheap runescape money on www.cheap-runescape-money.com
- Next by Date: Re: Component for reading DNG files
- Previous by thread: Re: D5 - Class\Collection example??
- Next by thread: Re: D5 - Class\Collection example??
- Index(es):
Relevant Pages
|