Skip to content

Instantly share code, notes, and snippets.

@brydavis
Created June 2, 2019 06:36
Show Gist options
  • Save brydavis/3b5abc3ee4ec1ab99d6a36a8cad41014 to your computer and use it in GitHub Desktop.
Save brydavis/3b5abc3ee4ec1ab99d6a36a8cad41014 to your computer and use it in GitHub Desktop.
class Person:
def __init__(self):
pass
def breathe(self):
print("I am breathing")
def eat(self):
print("I am eating")
def sleep(self):
print("I am sleeping")
class Employee(Person):
def __init__(self, position, salary):
pass
def work(self):
print("I am working")
def meet(self):
print("I am meeting")
class Professor(Employee):
def __init__(self, position, salary):
pass
def lecture(self):
print("I am lecturing")
def grade(self):
print("I am grading")
class Administrator(Employee):
def __init__(self, position, salary):
pass
def budget(self):
print("I am budgeting")
def implement(self):
print("I am implementing")
class Student(Person):
def __init__(self, major, year):
pass
def study(self):
print("I am studying")
def eat(self):
print("ramen only, please")
class TeachingAssistant(Student, Employee):
def preparing_course_materials(self):
print("I am preparing course materials")
ta = TeachingAssistant()
ta.breathe() # from Person
ta.sleep() # from Person
ta.study() # from Student
ta.work() # from Employee
ta.meet() # from Employee
ta.eat() # what will it be here?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment