'''
inheritance used for different classes if the same function or code is used in both
class Dog:
    def walk(self):
        print("walk")

class Cat:
    def walk(self):
        print('walk')

above is bad, don't repeat code
DRY
D-don't
R-repeat
Y-yourself



'''

class Mammal:
    def walk(self):
        print("walk")


class Dog(Mammal):
    #cannot leave class empty, so either give its own function or pass
    def bark(self):
        print('bark')


class Cat(Mammal):
    def meow(self):
        print('meow')


cat1 = Cat()
cat1.meow()


66ecc3f768f00ab852f81896cf5bd584e1c2a905
<mask token>


class Mammal:
    <mask token>


class Dog(Mammal):

    def bark(self):
        print('bark')


class Cat(Mammal):

    def meow(self):
        print('meow')


<mask token>

<mask token>


class Mammal:

    def walk(self):
        print('walk')


class Dog(Mammal):

    def bark(self):
        print('bark')


class Cat(Mammal):

    def meow(self):
        print('meow')


<mask token>

<mask token>


class Mammal:

    def walk(self):
        print('walk')


class Dog(Mammal):

    def bark(self):
        print('bark')


class Cat(Mammal):

    def meow(self):
        print('meow')


<mask token>
cat1.meow()

<mask token>


class Mammal:

    def walk(self):
        print('walk')


class Dog(Mammal):

    def bark(self):
        print('bark')


class Cat(Mammal):

    def meow(self):
        print('meow')


cat1 = Cat()
cat1.meow()

'''
inheritance used for different classes if the same function or code is used in both
class Dog:
    def walk(self):
        print("walk")

class Cat:
    def walk(self):
        print('walk')

above is bad, don't repeat code
DRY
D-don't
R-repeat
Y-yourself



'''

class Mammal:
    def walk(self):
        print("walk")


class Dog(Mammal):
    #cannot leave class empty, so either give its own function or pass
    def bark(self):
        print('bark')


class Cat(Mammal):
    def meow(self):
        print('meow')


cat1 = Cat()
cat1.meow()

