Question: In this assignment you are asked to write a Python program to define a class to model the characteristics of a generic employee. The class

 In this assignment you are asked to write a Python program
to define a class to model the characteristics of a generic employee.

In this assignment you are asked to write a Python program to define a class to model the characteristics of a generic employee. The class is part of a slightly larger program that includes code to use the class to create some employee objects and test its methods. The name of the class is "Employee' and includes the following methods and attributes: Method Name Purpose Input init Constructor- sets initial values for all object See belo None Displays a readable version of the Employee object None Employee data as a printable string hourly rate Calculates and returns the employee's hourly None Hourly rate float) rate of pay -divides salary by 2080 Returns the employee's current age in years Today's month - subtracts today's year from birth year, but int) and today's accounts for month differences (i.e. if birth year(int) month occurs before today's month, age is current year minus 1) age (int) minus birth year, otherwise that If age> 65, returns True- employee is eligible to retire. Otherwise, False Today's month (int) and today's year(int) can retire True or False empl num narme birth month birth year job title salary str str int nt str Int ID: "E+ 5 digits Employee name- "last name>, cfirst name" Integer in range 1 to 12 Integer, 4 digits, range 1800 and above Is this a currently enrolled student?"y" "n Annual salary: integer in range 0 to 1000000 Create several employee objects. Here's an example: el - Employee(E34568, "David Miller, 1960, 3, 'Accountant, 65000) e2 Employee( E22154', Margarete Smith', 1972, 10, Vice President', 115000) e3-EmployeeYE43 344.-Clase Smedley. 1982, 8, 'Salesman', 75000) e4 Employee('E12157, 'Daniel Arledge, 1952, 11, Lawyer, 92000) Then print each object, the age of the employee, and their retirement eligibility To create and test the Employee class do the following

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!