Generation

generate functionWed, 21 Dec 2022

Change the class so that when self.seniority is added, the designer is assigned 1 point and when self.intlawards is added, the designer is assigned 2 points. Correct the condition so that these points add up correctly: if (self.seniority + self.intlawards) % 7 == 0: self.grade_up() Example class: class Designer(Employee): def __init__(self, name, seniority, awards=2): super().__init__(name, seniority) self.intlawards = awards def check_if_it_is_time_for_upgrade(self): # for each accreditation, increase the counter by 1 # for now we assume that all designers are accredited self.seniority += 1 # condition for promoting an employee from the presentation if (self.seniority + self.intlawards) % 7 == 0: self.grade_up() # publication of the results return self.publish_grade()

class Designer(Employee): def __init__(self, name, seniority, awards=2): super().__init__(name, seniority) self.intlawards = awards def check_if_it_is_time_for_upgrade(self): # for each accreditation, increase the counter by 1 # for now we assume that all designers are accredited self.seniority += 1 # condition for promoting an employee from the presentation if (self.seniority + self.intlawards) % 7 == 0: self.grade_up() # publication of the results return self.publish_grade()

Questions about programming?Chat with your personal AI assistant