Click here to Skip to main content
16,020,261 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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!
Posted
Updated 12-Oct-10 23:45pm
v2

I believe this is somewhat similar to your situation, hopefully it may help Genealogy Tree[^]
 
Share this answer
 
v2
Interesting, thank you.
The only issue is that I don't have a need for a swing interface.
Is there a way to implement this without making use of the interface?!
Thanks!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900