Create an Employee Class that will have • Two instance variable: name and workingPeriod •A class method named employeeByJoiningYear(): • To create an Employee object by joining year for calculating the working period o It will have two Parameter name and year •A static method experienceCheck() to check if an Emplloyee is experienced or not o It will take working period and gender as parameter o If an employee's working period is less than 3, he or she is not experienced [You are not allowed to change the code below] # Write your code here employee1 = Employee('Dororo', 3) employee2 = Employee.employeeByJoiningYear('Harry', 2016) print(employee1.workingPeriod) print(employee2.workingPeriod) print(employee1.name) print(employee2.name) print(Employee.experienceCheck(2, "male")) print(Employee.experienceCheck(3, "female")) Ошри 3 Dororo Нarry He is not experienced She is experienced
Create an Employee Class that will have • Two instance variable: name and workingPeriod •A class method named employeeByJoiningYear(): • To create an Employee object by joining year for calculating the working period o It will have two Parameter name and year •A static method experienceCheck() to check if an Emplloyee is experienced or not o It will take working period and gender as parameter o If an employee's working period is less than 3, he or she is not experienced [You are not allowed to change the code below] # Write your code here employee1 = Employee('Dororo', 3) employee2 = Employee.employeeByJoiningYear('Harry', 2016) print(employee1.workingPeriod) print(employee2.workingPeriod) print(employee1.name) print(employee2.name) print(Employee.experienceCheck(2, "male")) print(Employee.experienceCheck(3, "female")) Ошри 3 Dororo Нarry He is not experienced She is experienced
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
Related questions
Question
Answer in pyhton
![Task 5
Create an Employee Class that will have
• Two instance variable: name and workingPeriod
•A class method named employeeByJoiningYear():
• To create an Employee object by joining year for calculating the working
period
o It will have two Parameter name and year
• A static method experienceCheck() to check if an Employee is experienced or not
o It will take working period and gender as parameter
o If an employee's working period is less than 3, he or she is not experienced
[You are not allowed to change the code below]
# Write your code here
employee1 = Employee('Dororo', 3)
Оutput
3
employee2 = Employee.employeeByJoiningYear('Harry",
2016) print(employee1.workingPeriod)
print(employee2.workingPeriod)
print(employee1.name)
print(employee2.name)
print(Employee.experienceCheck(2, "male"))
print(Employee.experienceCheck(3, "female"))
5
Dororo
Harry
He is not
experienced She is
experienced](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ffd7abea0-f815-47bb-a088-eb363ea7ac78%2F3d835b7f-a255-4cc7-a3c4-813051002884%2Fqvokil_processed.png&w=3840&q=75)
Transcribed Image Text:Task 5
Create an Employee Class that will have
• Two instance variable: name and workingPeriod
•A class method named employeeByJoiningYear():
• To create an Employee object by joining year for calculating the working
period
o It will have two Parameter name and year
• A static method experienceCheck() to check if an Employee is experienced or not
o It will take working period and gender as parameter
o If an employee's working period is less than 3, he or she is not experienced
[You are not allowed to change the code below]
# Write your code here
employee1 = Employee('Dororo', 3)
Оutput
3
employee2 = Employee.employeeByJoiningYear('Harry",
2016) print(employee1.workingPeriod)
print(employee2.workingPeriod)
print(employee1.name)
print(employee2.name)
print(Employee.experienceCheck(2, "male"))
print(Employee.experienceCheck(3, "female"))
5
Dororo
Harry
He is not
experienced She is
experienced
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 6 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,