Not a member of GistPad yet?
Sign Up,
it unlocks many cool features!
- class Employee:
- def __init__(self, name, base):
- self.name = name
- self.base = base
- def salary(self):
- return self.base
- class Teacher(Employee):
- def __init__(self, name, base, hours):
- super().__init__(name, base)
- self.hours = hours
- def salary(self):
- return self.base + self.hours * 500
- class Admin(Employee):
- def salary(self):
- return self.base * 1.2
- class Cleaner(Employee):
- def salary(self):
- return self.base * 0.8
RAW Paste Data
Copied
