Employee-Management-System-

Employee Management System (EMS)

A desktop-based Employee Management System developed with Java Swing to manage employee information and common HR operations through separate Admin and Employee dashboards.

The system provides employee management, attendance tracking, leave management, and payroll processing with local file-based data persistence.

Features

Authentication

Admin Dashboard

Administrators can manage the main HR operations through a tabbed dashboard.

Employee Management

Attendance Tracking

Payroll Management

Leave Management

Employee Dashboard

Employees can access their own dashboard to view and manage employee-related information, including:

Technologies

Project Architecture

The project is organized around several Java classes responsible for different parts of the system:

EMS/
│
├── EMS.java
├── LoginFrame.java
├── AdminDashboard.java
├── EmployeeDashboard.java
├── EmployeeDialog.java
│
├── DataManager.java
│
├── Employee.java
├── Attendance.java
├── Leave.java
├── LeaveStatus.java
├── Payroll.java
├── Department.java
└── UserRole.java

Main Components

EMS.java

The main entry point of the application. It initializes the DataManager and launches the login interface.

LoginFrame.java

Handles employee authentication and redirects users to the appropriate dashboard.

AdminDashboard.java

Provides administrative functionality for employees, attendance, payroll, and leave management.

EmployeeDashboard.java

Provides employees with access to their own profile, attendance, leave requests, and related information.

DataManager.java

Acts as the main data-management layer. It handles employees, attendance records, leave requests, and payroll data and persists them using .dat files.

Employee.java

Represents an employee and stores information such as ID, name, email, phone number, department, job role, hourly rate, hire date, and password.

Attendance.java

Handles check-in/check-out records and calculates working hours.

Leave.java

Represents employee leave requests and their current status.

Payroll.java

Handles payroll calculations including working hours, gross salary, tax deductions, and net salary.

Data Persistence

The application uses Java serialization to store data locally.

The main data files include:

employees.dat
attendance.dat
leaves.dat
payroll.dat

This allows employee and HR data to remain available when the application is restarted.

Departments

The system includes several departments:

Payroll Calculation

Payroll is calculated using employee working hours and hourly rate.

The system also considers approved leave days when calculating expected working hours and applies the configured tax deduction before calculating the final net salary.

Requirements

How to Run

Using IntelliJ IDEA

  1. Clone or download the repository.
  2. Open the project in IntelliJ IDEA.
  3. Make sure the Java SDK is configured.
  4. Open:
EMS.java
  1. Run the main() method.

Using the Terminal

Compile the Java files:

javac *.java

Then run:

java EMS

Default Admin Account

The application creates a default administrator account when no employee data exists.

Employee ID: 1000
Password: admin123

Change default credentials before using the project in a real environment.

Purpose

This project demonstrates practical implementation of:

It was developed as a practical Java application that combines multiple HR operations into one desktop system.