Question: How many different methods can Medicine object item 2 call? class Product: def _ _ init _ _ ( self ) : self.name = 'None'

How many different methods can Medicine object item2 call?
class Product:
def __init__(self):
self.name = 'None'
self.quantity =0
def set_item(self, nm, qty):
self.name = nm
self.quantity = qty
def get_item(self):
return self.name, self.quantity
def get_name(self):
return self.name
def get_quantity(self):
return self.quantity
class Medicine(Product):
def __init__(self):
Product.__init__(self)
self.expiration =2000
def set_expiration(self, exp):
self.expiration = exp
def get_medicine(self):
return self.name, self.quantity, self.expiration
item1= Product()
item2= Medicine()
Question 10 options:
2
6
4
8

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!