the tree adt stores elements at positionswhichas with positions in listare defined relative to neighboring positions the positions in tree are its nodesand neighboring positions satisfy the parent-child relationships that define valid tree thereforewe use the terms "positionand "nodeinterchangeably for trees as with list positiona position object for tree supports the methodelement()return the object stored at this position the real power of node positions in treehowevercomes from the accessor methods of the tree adt that return and accept positionssuch as the followingroot()return the tree' rootan error occurs if the tree is empty parent ( )return the parent of van error occurs if is the root children( )return an iterable collection containing the children of node if tree is orderedthen the iterable collectionchildren( )stores the children of in order if is an external nodethen children(vis empty in addition to the above fundamental accessor methodswe also include the following query methodsisinternal( )test whether node is internal isexternal( )test whether node is external isroot( )test whether node is the root these methods make programming with trees easier and more readablesince we can use them in the conditionals of if statements and while loopsrather than using nonintuitive conditional