0% found this document useful (0 votes)
22 views

Cse PR 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Cse PR 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Green University of Bangladesh

Dept. of Computer Science and Engineering


Faculty of Science and Engineering
Semester: (Fall, Year:2023), B.Sc. in CSE (Day)

Project Report
Course Title: OOP Lab
Course Code: CSE 202
Section: D1

Lab Project Name: A PROJECT OF EMPLOYEE MANAGEMENT SYSTEM.

Student Data
NAME: MD SAKIB HASAN EMON
Student ID: 222902026
Department of CSE (PC)
Green University of Bangladesh

Teachers Evolution
Teacher’s Name:
Submission Date:
Signature:
Marks:
Chapter 1 Introduction................................................................................................................................................ 3
1.1 Introduction............................................................................................................................................................ 3
1.2 Design Goals/Objective........................................................................................................................................ 3
Chapter 2 Design/Development/Implementation of the Project.............. 4
2.1 Section (Choose the name of this section as appropriate with your project)................................................ 4
2.2 Section (Choose the name of this section as appropriate with your project)..................................................
Chapter 3 Performance Evaluation.......................................................................................................................... 5
3.1 Simulation Environment/ Simulation Procedure.............................................................................................. 5
3.2 Results and Discussions....................................................................................................................................... 5
Chapter 4 Conclusion................................................................................................................................................... 6
4.1 Introduction............................................................................................................................................................ 6
4.1 Practical Implications........................................................................................................................................... 6
4.2 Scope of Future Work........................................................................................................................................... 6

1.1 Introduction:
The Employee Management System project in Java is designed to streamline workforce
management within an organization. This comprehensive system facilitates efficient
handling of employee data, including personal information, attendance records, and
performance metrics. With user-friendly interfaces, it enables administrators to easily
manage employee profiles, track working hours, and generate insightful reports. The project
aims to enhance organizational efficiency by providing a centralized platform for HR tasks,
fostering seamless communication, and ensuring effective resource utilization.

1.1 Objective:
The objective of the Employee Management System project in Java is to develop a
comprehensive and user-friendly application for efficient and automated management of
employee information. This system aims to streamline HR processes by providing
functionalities such as employee record maintenance, attendance tracking, performance
evaluation, and payroll management. Through a secure and intuitive interface, the project
seeks to enhance organizational productivity, data accuracy, and overall workforce
management.

2.1 Design/Development:
The provided Java program is an Employee Management System (EMS) with basic
functionalities like adding, viewing, removing, and updating employee details. Here's a step-
by-step breakdown:

1. **Main Menu Class (`MainMenu`)**:


- Displays a menu for various operations in the Employee Management System.

2. **Employee Add Class (`Employee_Add`)**:


- Creates a new file for each employee and writes their details to the file.

3. **Employee Details Class (`EmployDetail`)**:


- Stores attributes for an employee, such as name, ID, contact, etc.
- `getInfo` method takes user input for employee details.

4. **Employee Show Class (`Employee_Show`)**:


- Reads and displays the content of the file associated with a given employee ID.

5. **Employee Remove Class (`Employee_Remove`)**:


- Removes the file associated with a given employee ID if it exists.

6. **Employee Update Class (`Employee_Update`)**:


- Updates the content of the file associated with a given employee ID based on user input.

7. **Exit Class (`CodeExit`)**:


- Displays a closing message and exits the program when called.

8. **Main Class (`EmployManagementSystem`)**:


- Initiates the main menu and loops through user input until the exit option is chosen.
- Allows users to add, view, remove, update employee details, or exit the system.
- Calls relevant methods from other classes based on user choices.
- Provides a user-friendly interface for managing employee information.
This program is a simple demonstration of an Employee Management System in Java,
offering essential CRUD operations for employee records.

2.2 Implementation of the Project:

import java.util.*;

class MainMenu {
public void menu() {
System.out.println("\t\t*******************************************");
System.out.println("\t\t\t EMPLOYEE MANAGEMENT SYSTEM");
System.out.println("\t\t*******************************************");
System.out.println("\t\t\t --------------------");
System.out.println("\t\t\t @Emon");
System.out.println("\t\t\t --------------------");
System.out.println("\n\nPress 1 : To Add an Employee Details");
System.out.println("Press 2 : To See an Employee Details ");
System.out.println("Press 3 : To Remove an Employee");
System.out.println("Press 4 : To Update Employee Details");
System.out.println("Press 5 : To See All Employee Details");
System.out.println("Press 6 : To Exit the EMS Portal");
}
}

/* To add details of Employee */


class Employee_Add {
public void addEmployee(List<EmployDetail> employeeList) {
Scanner sc = new Scanner(System.in);

EmployDetail emp = new EmployDetail();


emp.getInfo();

if (!employeeList.contains(emp)) {
employeeList.add(emp);
System.out.println("\nEmployee has been Added :)\n");
} else {
System.out.println("\nEmployee already exists :(");
}

System.out.print("\nPress Enter to Continue...");


sc.nextLine();
}
}

/* Taking Employee Details */


class EmployDetail {
String name;
String email;
String position;
String employ_id;
String employ_salary;

public void getInfo() {


Scanner sc = new Scanner(System.in);
System.out.print("Enter Employee's name --------: ");
name = sc.nextLine();
System.out.print("Enter Employee's ID ----------: ");
employ_id = sc.nextLine();
System.out.print("Enter Employee's Email ID ----: ");
email = sc.nextLine();
System.out.print("Enter Employee's Position ----: ");
position = sc.nextLine();
System.out.print("Enter Employee's Salary ------: ");
employ_salary = sc.nextLine();
}

// Override equals method to check equality based on employ_id


@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
EmployDetail that = (EmployDetail) obj;
return employ_id.equals(that.employ_id);
}

@Override
public int hashCode() {
return Objects.hash(employ_id);
}
}

/* To Show details of Employee */


class Employee_Show {
public void viewEmployee(EmployDetail emp) {
System.out.println("Employee ID: " + emp.employ_id);
System.out.println("Employee Name : " + emp.name);
System.out.println("Email Information : " + emp.email);
System.out.println("Employee Position : " + emp.position);
System.out.println("Employee Salary : " + emp.employ_salary);
}

public void viewAllEmployees(List<EmployDetail> employeeList) {


System.out.println("\n\n\t\tEmployee Details\n\n");
for (EmployDetail emp : employeeList) {
viewEmployee(emp);
System.out.println("\n----------------------------------\n");
}
}
}

/* To Remove Employee */
class Employee_Remove {
public void removeEmployee(List<EmployDetail> employeeList, String ID) {
EmployDetail emp = new EmployDetail();
emp.employ_id = ID;

if (employeeList.contains(emp)) {
employeeList.remove(emp);
System.out.println("\nEmployee has been removed Successfully");
} else {
System.out.println("\nEmployee does not exist :(");
}
}
}

/* To Update details of Employee */


class Employee_Update {
public void updateEmployee(List<EmployDetail> employeeList, String ID, String
field, String newValue) {
EmployDetail emp = new EmployDetail();
emp.employ_id = ID;

int index = employeeList.indexOf(emp);


if (index != -1) {
switch (field.toLowerCase()) {
case "name":
employeeList.get(index).name = newValue;
break;
case "email":
employeeList.get(index).email = newValue;
break;
case "position":
employeeList.get(index).position = newValue;
break;
case "salary":
employeeList.get(index).employ_salary = newValue;
break;
default:
System.out.println("Invalid field for update");
}
System.out.println("\nEmployee details updated successfully");
} else {
System.out.println("\nEmployee does not exist :(");
}
}
}

/* To Exit from the EMS Portal */


class CodeExit {
public void out() {
System.out.println("\n*****************************************");
System.out.println("$ cat Thank You For Using my Software :) ");
System.out.println("*****************************************");
System.out.println("\t\t/~ <0d3d by Abhinav Dubey\n");
System.exit(0);
}
}

/* Main Class */
class EmployManagementSystem {
public static void main(String arv[]) {
/** To clear the output Screen **/
System.out.print("\033[H\033[2J");

Scanner sc = new Scanner(System.in);


Employee_Show epv = new Employee_Show();
List<EmployDetail> employeeList = new ArrayList<>();

int i = 0;

/*** Calling MainMenu Class function ****/


MainMenu obj1 = new MainMenu();
obj1.menu();

/*** Initializing loop for Menu Choices ***/


while (i < 7) {

System.out.print("\nPlease Enter choice :");


i = Integer.parseInt(sc.nextLine());

switch (i) {
case 1: {
/** Creating class's object and calling Function using that object **/
Employee_Add ep = new Employee_Add();
ep.addEmployee(employeeList);

System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
case 2: {
System.out.print("\nPlease Enter Employee's ID :");
String s = sc.nextLine();
EmployDetail emp = new EmployDetail();
emp.employ_id = s;
if (employeeList.contains(emp)) {
epv.viewEmployee(employeeList.get(employeeList.indexOf(emp)));
} else {
System.out.println("\nEmployee does not exist :(");
}

System.out.print("\nPress Enter to Continue...");


sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
case 3: {
System.out.print("\nPlease Enter Employee's ID :");
String s = sc.nextLine();
Employee_Remove epr = new Employee_Remove();
epr.removeEmployee(employeeList, s);

System.out.print("\nPress Enter to Continue...");


sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
case 4: {
System.out.print("\nPlease Enter Employee's ID :");
String I = sc.nextLine();
EmployDetail emp = new EmployDetail();
emp.employ_id = I;
if (employeeList.contains(emp)) {
epv.viewEmployee(employeeList.get(employeeList.indexOf(emp)));
} else {
System.out.println("\nEmployee does not exist :(");
break;
}
Employee_Update epu = new Employee_Update();
System.out.print("Please Enter the field you want to Update
(Name/Email/Position/Salary): ");
String field = sc.nextLine();
System.out.print("Please Enter the Updated Value :");
String n = sc.nextLine();
epu.updateEmployee(employeeList, I, field, n);

System.out.print("\nPress Enter to Continue...");


sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
case 5: {
epv.viewAllEmployees(employeeList);
System.out.print("\nPress Enter to Continue...");
sc.nextLine();
System.out.print("\033[H\033[2J");
obj1.menu();
break;
}
case 6: {
CodeExit obj = new CodeExit();
obj.out();
}
}
}
}
}

3.1Simulation Environment/ Simulation Procedure:


This simulation will cover the main functionalities of the Employee Management System
(EMS):

1.Add an Employee:

Choose option 1.
Enter employee details as prompted (name, ID, email, position, salary).

2.See an Employee's Details:

Choose option 2.
Enter the Employee ID whose details you want to see.

3.Remove an Employee:

Choose option 3.
Enter the Employee ID you want to remove.
4.Update Employee Details:

Choose option 4.
Enter the Employee ID whose details you want to update.
Choose the field to update (Name/Email/Position/Salary).
Enter the new value for the selected field.

5.See All Employee Details:

Choose option 5 to see details of all employees.

6.Exit the EMS Portal:

Choose option 6 to exit the system.

3.2Results and Discussions:


The Employee Management System in Java streamlines workforce administration by
automating tasks such as attendance tracking, payroll processing, and performance
evaluations. With a user-friendly interface, it facilitates efficient data management, ensuring
accurate employee records. Robust security features protect sensitive information, and the
system offers seamless integration with other business tools. This project enhances
organizational efficiency, promotes transparency, and empowers managers with valuable
insights for informed decision-making, ultimately fostering a productive and collaborative
work environment.

4 .1 Conclusion:
In conclusion, the Employee Management System project in Java successfully streamlines
HR processes, enhancing organizational efficiency. Its user-friendly interface simplifies
employee data management, payroll, and leave tracking. The system promotes accuracy and
transparency, reducing manual errors and ensuring compliance. With robust security
features, it safeguards sensitive information. Overall, the project demonstrates the potential
of Java in developing comprehensive and reliable solutions for effective employee
management within modern workplaces.

4.2 Practical Implications:


In the employee management system project in Java, create a user-friendly interface for
administrators to add, edit, and delete employee records. Implement features such as
attendance tracking, leave management, and performance evaluations. Utilize Java's object-
oriented principles for modular code organization. Integrate a database for persistent storage
of employee information. Ensure secure user authentication and authorization. Implement
functionalities for generating reports and analytics to aid decision-making. Regularly update
and maintain the system for optimal performance and functionality.

4.3 Scope of Future Work:


The future work for the Employee Management System project in Java involves enhancing
user interfaces for improved user experience, integrating advanced authentication
mechanisms for enhanced security, implementing data analytics features for performance
evaluation, and incorporating mobile accessibility. Additionally, exploring cloud integration
for scalability and real-time collaboration, adopting machine learning for predictive
analytics, and ensuring compliance with evolving regulatory standards are crucial aspects to
address in the ongoing development of the system.

You might also like