# EmployeeHierarchy Example # Illustrate how inheritance works: # Person < Employee < Executive # An Executive is an Employee with a bonus. from employee import Employee class Executive(Employee): def __init__(self, the_name, the_gender, the_age, \ the_id, the_salary, the_bonus): super( ).__init__(the_name, the_gender, the_age, \ the_id, the_salary) self.bonus = the_bonus def __str__(self): return super( ).__str__( ) + f" {self.bonus}" def compensation(self): return self.salary + self.bonus