This Java program implements a simple console-based Employee Management System (EMS). It allows users to add, view, update, and remove employee details stored in individual text files.
- Add Employee: Collects and stores employee details in a text file.
- View Employee: Displays the details of an employee from their file.
- Update Employee: Updates specific details of an employee in their file.
- Remove Employee: Deletes an employee's file.
- Exit: Exits the EMS program.
- Java Development Kit (JDK) installed on your machine.
-
Compile the Program:
javac EmployeeInfo.java
-
Run the Program:
java EmployeeInfo
-
Upon running the program, you will see the main menu with the following options:
Press 1 : To Add an Employee Details Press 2 : To See an Employee Details Press 3 : To Remove an Employee Press 4 : To Update Employee Details Press 5 : To Exit the EMS Portal -
Enter the number corresponding to your choice and follow the prompts.
EmployeeInfo: The main class that displays the menu and handles user input.MainMenu: Displays the main menu.Employee_Add: Handles adding a new employee.createFile(): Prompts for employee details and writes them to a new file.
Employee_Show: Handles displaying employee details.viewFile(String s): Reads and displays the contents of an employee's file.
Employee_Remove: Handles removing an employee.removeFile(String ID): Deletes the employee's file if it exists.
Employee_Update: Handles updating employee details.updateFile(String s, String o, String n): Replaces old detail with new detail in the employee's file.
EmployDetail: Holds employee details and provides a method to collect this information.getInfo(): Collects employee details from user input.
CodeExit: Displays a thank-you message and exits the program.
This project is licensed under the MIT License - see the LICENSE file for details.
- Created by Darshan M.



