This project is a Java-based Payroll Management System. It allows users to manage payroll calculations for different types of employees in an organization. The project demonstrates object-oriented programming principles, including inheritance, abstraction, and polymorphism.
The Payroll Management System consists of several Java classes to handle various functionalities:
Employee
: An abstract superclass that holds common features of all employee types.Payroll
: A class responsible for calculating the net pay for anyEmployee
object.Supervisor
: A subclass ofEmployee
representing a supervisor role with salary and production rate.TeamLeader
: A subclass ofWorker
representing a team leader role with completed training and a bonus.Worker
: A subclass ofEmployee
representing a regular worker with shift, hourly rate, and hours worked.
The Employee
class is an abstract superclass that holds common attributes like level, first name, last name, hire date, birth date, and an automatically generated unique employee number. It also defines an abstract method calculatePay()
to calculate weekly gross pay for subclasses.
The Payroll
class is responsible for calculating the net pay for an Employee
object. It includes methods to calculate various deductions and contributions from an employee's weekly pay.
The Supervisor
class is a subclass of Employee
representing a supervisor role. It includes attributes for salary and production rate, as well as a method to calculate the bonus earned based on the production rate.
The TeamLeader
class is a subclass of Worker
representing a team leader role. It includes attributes for completed training, required training hours, and a monthly bonus. It overrides the calculatePay()
method from the parent class to add additional pay.
The Worker
class is a subclass of Employee
representing a regular worker role. It includes attributes for shift, hourly rate, and hours worked. The calculatePay()
method is implemented to calculate the pay based on the shift and hours worked.
To use the Payroll Management System, you can follow these steps:
- Instantiate objects for different employee types (Supervisor, TeamLeader, Worker) with relevant details.
- Use the
Payroll
class to calculate the net pay for each employee. - Print reports to view the details of each employee and their net pay.
- Update employee details for the next pay period and recalculate net pay.
- Sameer Shaligram (https://github.com/s-shaligram) - Developer
This project was created as a part of Java Course.