A simple Java console-based Employee Management System built for practicing core Java, collections, and unit testing with JUnit 5.
The project demonstrates CRUD operations on employees, menu-driven user interaction, and testable business logic.
- Add Employee
- Accept employee details and add them to an in-memory list.
- List Employees
- Display all employees currently stored.
- Search Employee
- Search by:
- Employee ID
- Employee Name
- Department
- Salary
- Results are printed or returned as a list (for testing).
- Search by:
- Remove Employee
- Remove by ID with validation (handles empty list safely).
- Input Validation
- Prevents invalid removals and searches.
- Menu-Driven Flow
- Interactive console menu for user options.
- Java 21 (compatible with Java 8+ features: Streams, Lambdas, etc.)
- Collections Framework (
List,ArrayList,Stream API) - Java Time API (
LocalDate) - Exception & Edge Case Handling (empty list checks, invalid removal)
- JUnit 5 for unit testing:
@BeforeEachfor test setup- Assertions (
assertEquals,assertTrue,assertFalse,assertNotNull,assertThrows)
- Clean Code Practices
- Separation of concerns (
Employeemodel,EmployeeManagerlogic,EmployeeTestunit tests) - Static utility methods for menu options
- Separation of concerns (
- Java Development Kit (JDK) 17 or higher installed
- Command line terminal (CMD, PowerShell, or Terminal on Mac/Linux)
- Open a terminal and navigate to the project directory:
cd path/to/EmployeeManagementSystem/src
javac com/employee/manager/EmployeeManager.java com/employee/model/Employee.java
java -cp . com.employee.manager.EmployeeManager


