From the Examples in this module that I have posted, Write a class called ‘Student’ inheriting ‘Person’ class with the following properties and methods
Write another class called ‘Faculty’ inheriting ‘Employee’ with the following properties and methods
(customer.py has the classes you need)
*** IN PYTHON PLEASE***
from customer import *#import the customer module
class Student(Person):
Degree=None
GPA=None
def __init__(self,d,g):
self.Degree=d
self.GPA=g
def getDegree(self):#getters and setter methods
return self.Degree
def getGPA(self):
return self.GPA
def setDegree(self,d):
self.Degree=d
def setGPA(self,g):
self.GPA=g
class Faculty(Employee):
Department=None
Specialization=None
def __init__(self,d,s):#constructor of class
self.Department=d
self.Specialization=s
def getDepartment(self):#getters and setter methods
return self.Department
def getSpecialization(self):
return self.Specialization
def setDepartment(self,d):
self.Department=d
def setSpecialization(self,s):
self.Specialization=s
Screenshots:
The screenshots are attached below for reference.
Please follow them for proper indentation.
Please place the customer.py module and this module in same folder.
Get Answers For Free
Most questions answered within 1 hours.