Skip to content

Instantly share code, notes, and snippets.

@jonascheng
Created June 9, 2019 05:03
Show Gist options
  • Save jonascheng/4de227bbed1cd721831e5713fb22f864 to your computer and use it in GitHub Desktop.
Save jonascheng/4de227bbed1cd721831e5713fb22f864 to your computer and use it in GitHub Desktop.
SOLID-InheritedBirdClass-ISP
class Dove(FlyableBird):
def walk(self):
return 0.1
def fly(self):
return 10
class Eagle(FlyableBird):
def walk(self):
return 0.5
def fly(self):
return 50
class Penguin(DisFlyableBird):
def walk(self):
return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment