Results 1 to 5 of 5
  1. #1
    dr85 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Exclamation Family Tree App - Helllllp

    hi all,

    I have built a family tree program which thus far allows you to add relationships to nodes (mother, father, partner & siblings). This allows the tree to be built. well at least the links to be made.

    My problem is I have to represent the tree textually. This is proving to be very hard. I thought of allowing to display the ancestors and descendants for a particular node but this proves to be difficult, especially when there are more than two generations for displaying ancestors (great grandparents and above).

    To make things more clear I thought of using a file tree structure but got into a mess when displaying for great grandparents.

    I can provide the source if anyone wants to see it.

    Thanks for your time and expertise.

    David

  2. #2
    MediumDave is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    What structure do you have the family tree stored in?

  3. #3
    dr85 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default

    Thanks for the reply. I store the family members in an arraylist. each member points to other members in the arraylist (mother, father or child).

  4. #4
    goldest's Avatar
    goldest is offline Senior Member
    Join Date
    Oct 2009
    Location
    Pune, India
    Posts
    469
    Rep Power
    5

    Exclamation

    Cross-posted here: Java Programming Forums

    Goldest
    Java Is A Funny Language... Really!
    Click on * and add to member reputation, if you find their advices/solutions effective.

  5. #5
    MediumDave is offline Member
    Join Date
    Jan 2011
    Posts
    5
    Rep Power
    0

    Default

    And how do you want this laid out? ie, how would you draw it in real life with a piece of paper?

    Also, do you have methods that can identify the lowest descedant nodes and highest ancestor nodes? If you do, then I guess you just have to traverse the tree and write out the nodes as you find them, and do not iterate over nodes you have already processed.

    How do you envisage this looking?

Similar Threads

  1. Hello Family
    By Shyamz1 in forum New To Java
    Replies: 10
    Last Post: 12-10-2010, 10:11 AM
  2. Aspose.Total Product Family Q3 2010 Released
    By sherazam in forum Java Software
    Replies: 0
    Last Post: 10-04-2010, 01:48 PM
  3. Replies: 0
    Last Post: 08-18-2010, 10:31 AM
  4. Replies: 0
    Last Post: 04-04-2010, 07:40 AM
  5. Creating a Tree and then saving the Tree
    By jackmatt2 in forum New To Java
    Replies: 0
    Last Post: 08-22-2009, 12:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •