intro to computer science
Description
instructions are given in documents. i will be checking for use of plagiarism and AI.here is the starter code: class Animal(object):
‘a class that abstracts an animal’
def __init__(self, s = ‘default’, l = ‘default’):
self.species = s
self.language = l
def setSpecies(self, name):
‘sets the species of the animal’
self.species = name
def setLanguage(self, lang):
‘sets the language of the animal’
self.language = lang
def speak(self):
return f’I am a {self.species} and I {self.language}’
def __repr__(self):
return f’Animal({self.species}, {self.language})’
def __str__(self):
return self.speak()
def __add__(self, other):
return Animal(self.species + “/” +other.species,
self.language + “/” + other.language)
class Bird(Animal):
‘a class that extends Animal for a bird’
def fly(self, n):
‘returns a message about the height of flight’
return ‘I am flying {} feet!’.format(n)
def __init__(self, lang = ‘chirp’):
Animal.__init__(self, ‘bird’, lang)
def __repr__(self):
return “Bird({})”.format(self.language)
def __str__(self):
return Animal.speak(self)
class Mammal(Animal):
def __init__(self, weight=1, height=1):
Animal.__init__(#Add Code here)
# Add Code Here
def BMI(# Add code here:
# Add Code here
def __repr__(self):
# Add your canonical representation
def __str__(self):
# Add your printed representation
def # create a function to see if two objects of type Mammal have the same height and weight
# More code here

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."