Create a base class called fruit that describes certain characteristics of fruit. This class is inherited by two derived classes called apple and orange. These classes supply specific information to fruit that are related to these types of fruit.
Answers
Answered by
0
Answer:
thanks me and mark me brainliest
Explanation:
in python:
class fruit:
def__init__(self,taste,size,name):
self.taste=taste
self.name=name
self.size=size
def eat(self):
print(name,taste)
class apple(fruit):
def__init__(self,taste,size,name):
super().__init__(taste,size,name)
def eat(self):
print(name,taste):
class orange(apple):
def__init__(self,taste,size,name):
super().__init__(taste,size,name)
def eat(self):
print(name,taste):
Hi please mark me as brainlist and thank me bcoz this is my hardwork
Similar questions