Skip to content

Instantly share code, notes, and snippets.

@Professor-Sathish
Created April 10, 2022 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Professor-Sathish/06bb85b1386a73fa37187fa253b29dca to your computer and use it in GitHub Desktop.
Save Professor-Sathish/06bb85b1386a73fa37187fa253b29dca to your computer and use it in GitHub Desktop.
Exploring ADTs via Python Snippets - Abstract Class
#Abstract classes may not be instantiated
class A:#Abstract Class
def __init__(self,stuname):
self.collegename="kite"
self.stuname=stuname
class B(A):
def display(self):
print(f"college name {self.collegename}")
print(f"student name {self.stuname}")
ins=B("raja")
ins.display()
@Professor-Sathish
Copy link
Author

update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment