0% found this document useful (0 votes)
16 views3 pages

Employee Admin

This document describes an employee management system project that allows users to insert, delete, modify, and display employee details. It also calculates employee net pay and gross pay based on basic pay. The main EmployeeAdmin class contains methods for navigating menus to edit employee details or view salary details. These methods invoke classes like EmployeeDetail and Salary to add, delete, modify, and display employee information and salary reports.

Uploaded by

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

Employee Admin

This document describes an employee management system project that allows users to insert, delete, modify, and display employee details. It also calculates employee net pay and gross pay based on basic pay. The main EmployeeAdmin class contains methods for navigating menus to edit employee details or view salary details. These methods invoke classes like EmployeeDetail and Salary to add, delete, modify, and display employee information and salary reports.

Uploaded by

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

/*

*Project Title : Employee Management System


*Author Name : Gayathri.M
*Start Date and Time :
*Last Modified Date and Time:
*/

/*Employee management system console project is used to insert,delete,modify and


display
the employee detail also used for calculate net pay and gross pay respect to
basic pay of the employee
*/
package employeeManagementSystem;

import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.ArrayList;

/*class EmployeeAdmin is a main class used to choose and invoke the


add,delete,modify,
display and salaryDetail functions*/
public class EmployeeAdmin
{
static ArrayList<String> arraylistId=new ArrayList<>();
static ArrayList<String> arraylistName=new ArrayList<>();
static ArrayList<String> arraylistEmailId=new ArrayList<>();
static ArrayList<String> arraylistDesignation=new ArrayList<>();
static ArrayList<String> arraylistDateofJoining=new ArrayList<>();
static ArrayList<Long> arraylistSalary=new ArrayList<>();
static ArrayList<String> arraylistGender=new ArrayList<>();
static ArrayList<Long> arraylistContact=new ArrayList<>();
static ArrayList<String> arraylistDateofBirth=new ArrayList<>();
static int choice;
/*method for choose editDetail and viewSalary method to invoke
EmployeeDetail class or EmployeeSalary class*/
static void signIn()
{
try
{
Scanner scanner=new Scanner(System.in);
System.out.println(" ");
System.out.println("*****Enter your choice****");
System.out.println("1)Goto Employee Detail menu");
System.out.println("2)Goto Employee Salary menu");
System.out.println("3)Close The Application");
choice=scanner.nextInt();
}
catch(InputMismatchException inputmismatchexception)
{
System.out.println("Input Miss matched");
EmployeeAdmin.main(null);
}
while(true)
{
switch(choice)
{
case 1:EmployeeAdmin.editDetail();
break;
case 2:EmployeeAdmin.viewSalary();
break;
case 3:System.exit(0);
break;
default:System.out.println("*****Invalid Input*****");
EmployeeAdmin.main(null);//calling main method
}

}
}
/*method for choose add,delete,modify and display method to manipulate
employee detail*/
static void editDetail()
{
Scanner scanner=new Scanner(System.in);
while(true)
{
try
{
System.out.println(" ");
System.out.println("****Enter your choice*****");
System.out.println("1)Add Employee details");
System.out.println("2)Delete Employee details");
System.out.println("3)Modify Employee detail");
System.out.println("4)View Employee datail");
System.out.println("5)Goto Main menu");
choice=scanner.nextInt();
}catch(InputMismatchException inputmismatchexception)
{
System.out.println("Input Miss matched");
EmployeeAdmin.editDetail();
}
EmployeeDetail employeedetail=new EmployeeDetail();
switch(choice)
{
case 1:employeedetail.addDetail();
break;
case 2:employeedetail.deleteDetail();
break;
case 3:employeedetail.modifyDetail();
break;
case 4:employeedetail.displayDetail();
break;
case 5: EmployeeAdmin.main(null) ;
break;
default:System.out.println("***Invalid input please enter
valid input***");
break;
}
}
}

/*method for invoke displaySalary method to print employee salary


details*/
static void viewSalary()
{
try
{
Scanner scanner=new Scanner(System.in);
System.out.println(" ");
System.out.println("Enter your choice");
System.out.println("1)Print Salary detail");
System.out.println("2)Goto main menu");
choice=scanner.nextInt();
if(choice==1)
{
Salary.displaySalary();

}
else if(choice==2)
{
EmployeeAdmin.main(null);
}
else
{
System.out.println("*****Invalid Input******");
EmployeeAdmin.viewSalary();
}
}catch(InputMismatchException inputmismatchexception)
{
System.out.println("Input miss matched");
EmployeeAdmin.viewSalary();
}

public static void main(String args[])


{
signIn();
}
}

You might also like