Question: Write a class called Worker that encapsulates data about an office worker. The class should store the following things: Employee Number Office Number Name (
Write a class called Worker that encapsulates data about an office worker. The class should store the following things: Employee Number Office Number Name First and Last BirthdateTotal number of hours worked: Totalnumber of overime hours workedYour class should also implement the following methods: init This is your constructor. It should not accept any arguments. getemployeenumber Returns the employee number setemployeenumberx Changes the employee number getofficenumber Returns the office number set officenumberx If the office number given is less than or greater than returnFalse, otherwise return True getnamel Returns the employee's name setnamex Changes the employee's name setbirthdated m y Changes the employee's birthdate The function should return true if the month is and the day is dont worry about which month has how many days and false if an invalid day or month is entered. gethoursworked Returns the number of hours worked addhoursx If the number of hours being added is greater than add hours to the total hours worked and add the remainder to the total overtime gethoursovertime Returns the number of overtime hours workedYou do not need to round or truncate your output. Name your class Worker and save
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
