DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Can a child have more than one parent?

  1. #1
    Beginner Guest

    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?

  2. #2
    Beginner Guest

    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?



  3. #3
    Matthew Solnit Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center