Question: write a class called NotchNode in python the required attributes are key : is a Notch object name: is a string x : is the

write a class called NotchNode in python

the required attributes are

key : is a Notch object

name: is a string

x : is the x child NotchNode or none

y: is the y child notchNode or none

parent : the parent NotchNode or none

__init__(self,key,name,x=None,y=None,parent=None) :

this should save all the arguments as attributes of the same names

and

set_x(self,other)

take another NotchNode , other and then make it the x child of this node and also make this node the parent of other

and

set_y(self,other)

take another NotchNode , other and then make it the y child of this node and also make this node the parent of other

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!