The Java training online
Try to work with the helping elements before looking at the solution…
Helping elements
Tree
, they will be inherited and available in SpatializedTree
getCrownBaseHeight()
, make sure to write 2d / 3d
(if the 2 operands of a division are integers, only the integer part is kept in the result: 2 / 3 = 1
, but 2d / 3d = 1.5
)toString ()
in Tree
to display the crownRadius
and crownBaseHeight
valuesNumberFormat
to display 1.12
instead of 1.119999999999
, see the online javadoc for NumberFormat, try to have the english .
decimal separatorA possible solution