Re: D5 - Class\Collection example??




On Sun, 14 Oct 2007 18:21:46 +0200, Hans-Peter Diettrich
<DrDiettrich1@xxxxxxx> wrote:

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

Of course my example of a collection of wives was to be funny but the
substance of your points are well worth considering when designing an
object heirarchy. It's hard to anticipate all the possible twists and
turns.

Thanks to Tom and all that responded. It will help me understand the
Delphi way.

Thank you,

Don
.



Relevant Pages

  • Re: A feminist defense of mens rights
    ... "commitment" to the well being of their partner and, IMV, therefore ... agreement to share over-rides individuality - otherwise it's ... What I am saying is that marriage needs to return to being a binding ... the end of no-fault divorce. ...
    (soc.men)
  • Re: A feminist defense of mens rights
    ... "commitment" to the well being of their partner and, IMV, therefore ... etc) equally does not have a "commitment" to their partner however I'm ... the end of no-fault divorce. ... this failure to continue protecting the family that I would change by extracting a significant price for a no-fault divorce. ...
    (soc.men)
  • Re: A feminist defense of mens rights
    ... It is when situations change that the sharing commitment bites. ... recognize that a significant change in situation for their partner that could make the continuation of the pregnancy untenable does not have a "commitment" to the well being of their partner and, IMV, therefore loses any legitimate right to complain. ... disadvantages to divorce. ... marriage that isn't meeting your needs. ...
    (soc.men)
  • Re: Gay Marriage
    ... attitude that life inflicts plenty of responsibilities on us without our ... Still, it is a commitment. ... the 'perfect partner'. ... But should the Church have made divorce a sacrament? ...
    (soc.religion.quaker)
  • Re: Double-standards
    ... the money ... The courts have determined that money spent before the divorce can be ... time job called "Stay At Home Partner" is carrying out a Career CHANGE, ... Your actions during a marriage should have consequences, ...
    (soc.men)