Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python please Write a class called Worker that encapsulates data about an office worker. The class should store the following things: - Employee Number -
python please
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) - Birthdate - Total number of hours worked - Total number of overtime hours worked Your class should also implement the following methods: - _init_() 0 This is your constructor. It should not accept any arguments. - get employee number() - Returns the employee number - set employee number (x) - Changes the employee number - get office number() - Returns the office number - set office number (x) - If the office number given is less than 100 or greater than 500 return False, otherwise return True - get name() - Returns the employee's name - set name (x) - Changes the employee's name - get birthdate (m,d,y) - Sets the employee's birthdate Accepts three arguments: Month, Day, Year - set birthdate (d,m,y) - Changes the employee's birthdate - The function should return true if the month is 1-12 and the day is 1-31 (don't worry about which month has how many days) and false if an invalid day or month is entered. - get hours workedl) - Returns the number of hours worked - add hours (x) - If the number of hours being added is greater than 9 , add 9 hours to the total hours worked and add the remainder to the total overtime - get hours overtime() - Returns the number of overtime hours workedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started