Question: Implement an Employee Management System for a company by completing the following tasks: Create an Employee class: This class should have the following attributes: employee
Implement an Employee Management System for a company by completing the following tasks:
Create an Employee class:
This class should have the following attributes:
employeeid: A unique identifier for each employee.name: The name of the employee.basesalary: The base salary of the employee.
The class should include the following methods:
A constructor that initializes the employeeid name, and basesalary attributes.A method called calculatesalary that returns the base salary of the employee.A str method that returns the employee's name and employeeid as a string.
Create a FullTimeEmployee class:
This class should inherit from the Employee class and contain an additional attribute:
bonus: A monetary bonus for fulltime employees.
The class should include:
A constructor that initializes the employeeid name, basesalary, and bonus.An overridden calculatesalary method that returns the sum of basesalary and bonus.
Create a PartTimeEmployee class:
This class should inherit from the Employee class and contain the following additional attributes:
hoursworked: The number of hours worked by the parttime employee.hourlyrate: The hourly wage for the parttime employee.
The class should include:
A constructor that initializes the employeeid name, basesalary, hoursworked, and hourlyrate.An overridden calculatesalary method that returns the sum of basesalary and the product of hoursworked and hourlyrate ie basesalary hoursworked hourlyrate
Answer text Question
Rich text editor
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
