Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Requirements of the final project: First step, create the classes as described. Create a base class Employee that has the following attributes: o Employee s
Requirements of the final project:
First step, create the classes as described.
Create a base class Employee that has the following attributes:
o Employees name string
o Employees address string
o Vehicle data Vehicle object
The child classes FullTimeEmployee, HourlyEmployee and Consultant that inherit from
Employee class have the following additional properties
o FullTimeEmployee salary float
o HourlyEmployee hoursWorked int and hourlyRate float
o Consultant hoursWorked int and ProjectType valid values are and
The child class Management inherits from both FullTimeEmployee class and Consultant
class. Management class has inherited three attributes ie name, address, and vehicle object
indirectly from Employ class, one attribute ie salary from FullTimeEmployee class and
two attributes ie hours worked and project type from Consultant class.
All these classes have the init method as well as the get, set, and str methods. In
addition, they have additional methods, ie computecompensation and
computereimbursement as described below. Function computecompensation returns
weekly compensation and function computereimbursement returns weekly reimbursement.
Compensation weekly for any employee type doesnt call for outside information. In
other words, all information needed is available after initializingcreating an object.
Compensation is to be computed as follows:
o FullTimeEmployee: Compensation is salary minus taxes and taxes are calculated based
on the tax rate in the table below. Please notice that this format calculates the annual
Hongchang Wang Spring MIS
JSOM, UTD Due by : pm
compensation and what this function needs to return is the weekly compensation
assuming there are weeks per year This requirement is different from the one in
HW
Salary Tax Rate
$ or less
$ and $ for the first for the rest
$ for the first for the amount
between and and for the
rest
For example, someone whose salary is $ will pay on the first on the
next and on the remaining
o HourlyEmployee: Compensation is hoursWorked times hourlyRate for the first hours.
For hours in excess of hours, the hourly rate is times the regular hourly rate. The
sum of the two is weekly compensation.
For example, someone whose hourlyRate is $ and who has worked hours will
earn $ $
o Consultant: Compensation is HourlyRate times the hours worked this is weekly
compensation HourlyRate for Consultants is computed based on the ProjectType as
given in the table below:
Project Type HourlyRate
$
$
$
o Management: Total weekly compensation is the sum of the compensation from
FullTimeEmployee role ie from salary and the compensation from Consultant role ie
from hours worked on a project
Reimbursement weekly for every employee type calls for outside information as input
arguments In other words, the information is not provided when initializingcreating an
object and there is no corresponding attribute. Reimbursement is to be computed as follows:
Hongchang Wang Spring MIS
JSOM, UTD Due by : pm
o FullTimeEmployee: This method will take an argument, which is the annual expense. If
the annual expense is no more than $ then the total reimbursement will be equal to
the annual expense. If the annual expense is more than $ then the total
reimbursement will be equal to $ plus percent of the amount of the annual
expense that exceeds $ Please note that this format calculates the annual
reimbursement, and what this function needs to return is the weekly reimbursement
assuming there are weeks per year For example, someone whose annual expense is
$ will get $ plus on the remaining $ $ totaling
$
Expense Reimbursement Rate
$ or less
$ for the first $ for the rest
o HourlyEmployee: This method will take an argument, which is the weekly expense. If
the weekly expense is no more than $ then the total reimbursement will be equal to
the weekly expense. If the weekly expense exceeds $ then the total reimbursement
will be equal to $ For example, someone whose weekly expense is $ will get a
weekly compensation of $ while someone whose weekly expense is $ will get a
weekly compensation of $
Step 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