Implementation of [A]1---->*[B]
From: Loeffelholz (loeffelholz_at_gmx.net)
Date: 08/15/04
- Next message: Isaac Gouy: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- Previous message: Universe: "Re: misconceptions on computer science"
- Next in thread: Universe: "Re: Implementation of [A]1---->*[B]"
- Reply: Universe: "Re: Implementation of [A]1---->*[B]"
- Reply: Daniel T.: "Re: Implementation of [A]1---->*[B]"
- Reply: Ilja Preuß: "Re: Implementation of [A]1---->*[B]"
- Reply: H. S. Lahman: "Re: Implementation of [A]1---->*[B]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 15 Aug 2004 17:20:18 +0200
Hello,
concerning following kind of association:
[A]1----->*[B]
Concrete, for instance:
[Company]1---->*[Employee]*<----1[Project]
How can one prevent that an Employee is referenced more than one time by a
Project?
My thoughts so far are:
1. A Project holds its own copy of Employee. Dropped out, because Employee
is a reference object and there are other references to it.
2. Prevent it over the GUI. Okay, but it wouldn't prevent that I - as the
programmer - do this mistake accidently somewhere in the code.
3. Create a ProjectManager class which would check all Projects if one would
add a Employee to a Project. Okay, but seems to me as a too great efford
for all such kind of associations.
Are there other options? How do you implement this in daily work?
Thanks
L.
- Next message: Isaac Gouy: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- Previous message: Universe: "Re: misconceptions on computer science"
- Next in thread: Universe: "Re: Implementation of [A]1---->*[B]"
- Reply: Universe: "Re: Implementation of [A]1---->*[B]"
- Reply: Daniel T.: "Re: Implementation of [A]1---->*[B]"
- Reply: Ilja Preuß: "Re: Implementation of [A]1---->*[B]"
- Reply: H. S. Lahman: "Re: Implementation of [A]1---->*[B]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|