Re: D5 - Class\Collection example??



Hans-Peter Diettrich 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 state of Maine (USA), they claim every one is related! :)

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


--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5

.



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)