Computer Science, asked by priscachivunga99, 11 months ago

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 raynanndini
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