Question: For the base class Person example provided in the tutorial, if we need to add a subclass for kids on site who attend the daycare

For the base class Person example provided in the tutorial, if we need to add a subclass for kids on site who attend the daycare in which we keep track of their primary parent, what code segment could implement this subclass and create an instance of it called kid_1?
a.)
class Daycarekid:
def (self, fname, Iname, title, parent):
self.parent = parent
def get_parent(self):
return "Parent: "+ str(self.parent)
def set_parent(self, parent):
self. parent = parent
kid_1= DaycareKid('Johnny', 'Doe', 'kid', 'Jane Doe')
b.)
class Daycarekid(Person):
def (self, fname, lname, title, parent):
super().(fname, lname,title)
self.parent = parent
def get_parent(self):
return "Parent: "+ str(self.parent)
def set_parent(self, parent):
self. parent = parent
kid_1= DaycareKid('Johnny', 'Doe', 'kid', 'Jane Doe')
c.)
class Daycarekid(Person):
def (self, fname, lname, title, parent):
super().(fname, Iname)
self.parent = parent
def get_parent(self):
return "Parent: "+ str(self.parent)
def set_parent(self, parent):
self. parent = parent
kid_1= Daycarekid(' Johnny', 'Doe', 'kid', 'Jane Doe')
 For the base class Person example provided in the tutorial, if

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!