Last active
July 21, 2018 15:19
-
-
Save farhaanbukhsh/bf053d34a0b94008a915af68ce804f8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from abc import ABC, abstractmethod | |
class BuffetHogger(ABC): | |
@abstractmethod | |
def starter_hogging(self): | |
pass | |
@abstractmethod | |
def main_course_hogging(self): | |
pass | |
@abstractmethod | |
def dessert_hogging(self): | |
pass | |
def template_hogging(self): | |
self.starter_hogging() | |
self.main_course_hogging() | |
self.dessert_hogging() | |
class Farhaan(BuffetHogger): | |
def starter_hogging(self): | |
print("Eat Chicken Tikka") | |
print("Eat Kalmi Kebab") | |
def __call__(self): | |
self.template_hogging() | |
def main_course_hogging(self): | |
print("Eat Biryani") | |
def dessert_hogging(self): | |
print("Eat Phirni") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment