Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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. 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 Output/returns Constructor - sets initial values for all object |See below@None attributes nit Displays a readable version of the Employee object Calculates and returns the emplovee's hourlv rate of pav- divides salary by 2080 Returns the employee's current age in years |Today's - subtracts today's year from birth year, but month (int) accounts for month differences (i.e. if birth and today's month occurs before today's month, age is year(int) curren minus 1 If age > 65, returns 'True' - employee is eligible to retire. Otherwise, 'False None Employee data as a printable strin Hourly rate (float) hourly rate None age age (int) t year minus birth year, otherwise that Today's month (int) and today's can retire True or False ear(int) Attributel empl num name birth month birth vear ob title salai int int str int Definitioin ID: "E" 5 digits Employee name-
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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