Problem 3: Noisy Cat (100pts)
More cats! Fill in this implemention of a class called NoisyCat
, which is just like a normal Cat
. However, NoisyCat
talks a lot -- twice as much as a regular Cat
!
We may change the implementation of Pet
and Cat
while testing your code, so make sure you use inheritance correctly.
class NoisyCat: # Dose this line need to change?
"""A Cat that repeats things twice.
>>> chocola = NoisyCat('Chocola', 'Minazuki Kashou')
>>> isinstance(chocola, Cat) # check if chocola is an instance of Cat.
True
>>> chocola.talk()
Chocola says meow!
Chocola says meow!
"""
def __init__(self, name, owner, lives=9):
# Is this method necessary? If not, feel free to remove it.
"*** YOUR CODE HERE ***"
def talk(self):
"""Talks twice as much as a regular cat.
"""
"*** YOUR CODE HERE ***"