Tree.java 488 B

123456789101112131415161718192021222324
  1. public class Tree {
  2. /*
  3. * Usually, you would use an array for this, but I wanted to keep it simple.
  4. */
  5. /** A leaf of this tree */
  6. Leaf leaf1;
  7. /** Theoretically, you should make those comments over every line */
  8. Leaf leaf2;
  9. Leaf leaf3;
  10. Leaf leaf4;
  11. Root mainRoot;
  12. /** age in years */
  13. int age;
  14. /** name of this tree in English */
  15. String name;
  16. /** scientific name of this type of tree in Latin */
  17. String scientificName;
  18. }