-
Can a child have more than one parent?
I'm trying to design an OO system but I'm having trouble. Does it makes for
a child object to have more than one parent?
-
Re: Can a child have more than one parent?
IOW, is it considered good design practice for an object to have, for example,
4 different parents? I've got a gut feeling this is bad design, but I can't
quite put my finger on why.
"Beginner" <a@b.com> wrote:
>
>I'm trying to design an OO system but I'm having trouble. Does it makes
for
>a child object to have more than one parent?
-
Re: Can a child have more than one parent?
"Beginner" <a@b.com> wrote in message news:3c10c6ac$1@147.208.176.211...
>
> I'm trying to design an OO system but I'm having trouble. Does it makes
for
> a child object to have more than one parent?
It depends on what you're doing. For example, a HumanBeing class would
certainly have two parents, whereas an Amoeba class would only have one.
Simple tree structures use one parent per node, but a more complicated
structure could have several. Maybe if you explain the larger picture you
will get some better advice.
-- Matthew Solnit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|