N
N
nohchiadam2019-12-28 14:42:32
Java
nohchiadam, 2019-12-28 14:42:32

How to build a tree architecture?

5e073f455b106695877116.png
I want to make a tree structure like in the screenshot.
How can you implement this in Java, in which direction to dig?
More details on the video: https://www.youtube.com/watch?v=V-IEc_-c_po&featur...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2019-12-28
@xez

Elementary. Take the person class. Add parents. Ready.
You can, to simplify navigation, add List<Person> children- for the list of children.

public class Person {
   String name;
   Date birthDate;
   Date deathDate;
   Sex sex;
   String note;
   Person mother;
   Person father;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question