Employee Admin
Employee Admin
import java.util.InputMismatchException;
import java.util.Scanner;
import java.util.ArrayList;
}
}
/*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;
}
}
}
}
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();
}