Create a base class fruit that describes certain characteristics of fruit.This class is inherited by two derived classes called orange and Apple.These classes supply specific information to fruit that are related to these types of fruit
Answers
Answered by
0
Answer:
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):
I hope you like it
Stay home and stay safe
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii please mark me as brainlist
Similar questions
English,
5 months ago
Hindi,
5 months ago
Social Sciences,
5 months ago
Science,
11 months ago
Computer Science,
11 months ago
English,
1 year ago