class Animal: def __init__(self, name, age): self.name = name self.age = age def make_sound(self): print("The animal makes a sound.") class Mammal(Animal): def feed_young_with_milk(self): print("The mammal feeds its young with milk.") class Dog(Mammal): def __init__(self, name, age, breed): super().__init__(name, age) self.breed = breed def make_sound(self): print("The dog barks.") class Cat(Mammal): def __init__(self, name, age, color): super().__init__(name, age) self.color = color def make_sound(self): print("The cat meows.") dog1 = Dog("Buddy", 3, "Labrador") cat1 = Cat("Fluffy", 2, "White") print(dog1.name) # prints "Buddy" dog1.make_sound() # prints "The dog barks." dog1.feed_young_with_milk() # prints "The mammal feeds its young with milk." print(cat1.name) # prints "Fluffy" cat1.make_sound() # prints "The cat meows." cat1.feed_young_with_milk() # prints "The mammal feeds its young with milk."