figure an inorder drawing of binary tree to demonstrate use of the binaryeulertour frameworkwe develop subclass that computes graphical layout of binary treeas shown in figure the geometry is determined by an algorithm that assigns xand -coordinates to each position of binary tree using the following two rulesx(pis the number of positions visited before in an inorder traversal of (pis the depth of in in this applicationwe take the convention common in computer graphics that xcoordinates increase left to right and -coordinates increase top to bottom so the origin is in the upper left corner of the computer screen code fragment provides an implementation of binarylayout subclass that implements the above algorithm for assigning (xycoordinates to the element stored at each position of binary tree we adapt the binaryeulertour framework by introducing additional state in the form of count instance variable that represents the number of "in visitsthat we have performed the -coordinate for each position is set according to that counter class binarylayout(binaryeulertour) """class for computing ( ,ycoordinates for each node of binary tree "" def init (selftree)must call the parent constructor superinit (treeinitialize count of processed nodes self count def hook invisit(selfpdpath) -coordinate serialized by count elementsetx(self count elementsety(dy-coordinate is depth advance count of processed nodes self count + code fragment binarylayout class that computes coordinates at which to draw positions of binary tree we assume that the element type for the original tree supports setx and sety methods