A simple Object-Oriented Java application that demonstrates the implementation of an employee tracker system.
The system supports Full-Time and Part-Time employees and calculates their salaries using polymorphism and abstraction.
- Add employees to the tracker system
- Remove employees by ID
- Display employee details
- Calculate salaries dynamically using polymorphism
- Supports multiple employee types:
- Full-Time Employees
- Part-Time Employees
This project demonstrates several core Java OOP principles:
An abstract Employee class defines common properties and behaviors.
FullTimeEmployee and PartTimeEmployee extend the Employee class.
calculateSalary() is implemented differently for each employee type.
Private fields with public getters ensure controlled access.
Uses ArrayList to store and manage employees.
Employee Tracker System
β
βββ Employee (Abstract Class)
β βββ name
β βββ id
β βββ calculateSalary()
β
βββ FullTimeEmployee
β βββ monthlySalary
β
βββ PartTimeEmployee
β βββ hoursWorked
β βββ hourlyRate
β
βββ PayrollSystem
β βββ addEmployee()
β βββ removeEmployee()
β βββ displayEmployees()
β
βββ Main
βββ Runs the payroll system
Salary = Monthly Salary
Salary = Hours Worked Γ Hourly Rate
javac Main.java
java Main