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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 5RQ
icon
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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Binary numbers
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,