-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathfaculty.py
More file actions
28 lines (19 loc) · 876 Bytes
/
faculty.py
File metadata and controls
28 lines (19 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from abc import ABC, abstractmethod
class Faculty(ABC):
def __init__(self, faculty_Name, faculty_Head, faculty_ID):
self.faculty_Name = faculty_Name
self.faculty_Head = faculty_Head
self.faculty_ID = faculty_ID
@abstractmethod
def show_facultyNames(self):
pass
class BCIFaculty(Faculty):
def show_facultyNames(self):
print(f"Faculty Name: {self.faculty_Name}, faculty Head: {self.faculty_Head}, faculty ID: {self.faculty_ID}")
if __name__ == "__main__":
Faculty1 = BCIFaculty("School of Computing", "Dr.Waruna Premachandra", "001")
Faculty2 = BCIFaculty("School of Business", "Dr.Tharanga Rathnayaka", "002")
Faculty3 = BCIFaculty("School of Education", "Rev.Dr.George Perera", "003")
Faculty1.show_facultyNames()
Faculty2.show_facultyNames()
Faculty3.show_facultyNames()