Hey!
I've been tasked with writing a small program which represents a Roman Legion in Java.
Now, I've already created a working version which involves Array of Arrays of Arrays, etc. That is, a Legion is composed of 10 organizational units, each of which is composed of 6 other organizational units, each of which is composed by another 8 organizational units and finally, each of these is composed by 8 soldiers.
Now, my issue is that when working with Arrays, getting to the soldiers at the bottom of the "stack" of arrays is complicated.
Is there sometime I'm missing, or is creating this "Russian matryoshka doll" format with arrays the only way?
Thank you!!
EDIT: So I've been doing some more research and I found the "tree" object which seems to work with nodes that all interconnect. Can anyone provide some insight into the use of this object? I looked at some documentation and I'm having some issues figuring out whether I can have objects represent diffrerent nodes or "branches" of the tree.
Thank you!