The Java training online
Try to work with the helping elements before looking at the solution…
Helping elements
Tree
and in SpatializedTree
, the new variables should be added in the superclass: Tree
: they will be inherited in the subclass.getId ()
…dbh
toString ()
method of Tree
may be adapted to display the 4 instance variablestoString ()
method of SpatializedTree
relying on its superclass needs no changeTree
with its 4 parametersA possible solution