5._add_methods_in_the_tree
The Java training online
5. Add methods in the tree
Purpose: Choose where methods should be added in an inheritance graph
Statement of the exercise:
- Add 2 methods in the tree,
getCrownRadius()
returningdbh / 5
andgetCrownBaseHeight()
returning2 / 3 * height
- Adapt
Tree.toString()
to display thecrownRadius
andcrownBaseHeight
5._add_methods_in_the_tree.txt ยท Last modified: 2021/12/13 09:28 by 127.0.0.1