import java.util.Scanner;
public class Employee {
public static void main(String[] args) {
/*-----------------------------------------------------------*/
Scanner scanner = new Scanner(System.in);
String employeeNames[] = {"Caleb Enrix", "Xiolou", "Maria"},
employeeCodes[] = {"291215", "171117", "071119"},
employeeTypes[] = {"Regular Staff", "Team Leader", "Manager"},
days[] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"},
types[] = {"Undertime", "Regular", "Overtime"};
int pay[] = new int[5], sum = 0;
boolean doMatch = false;
/*-----------------------------------------------------------*/
//names
System.out.println("—————EMPLOYEE NAMES—————");
for(int i = 0; i < 3; i++) {
System.out.println(employeeNames[i]);
}
//codes
System.out.println("\n\n—————EMPLOYEE CODES—————");
for(int i = 0; i < 3; i++) {
System.out.println(employeeNames[i] + "'s Code: " + employeeCodes[i]);
}
//types
System.out.println("\n\n—————EMPLOYEE TYPES——————");
for(int i = 0; i < 3; i++) {
System.out.println(employeeNames[i] + ": " + employeeTypes[i]);
}
//details
System.out.println("\n\n—————EMPLOYEE DETAILS—————");
System.out.print("Employee Name: ");
String employeename = scanner.nextLine();
System.out.print("Employee Code: ");
String employeecode = scanner.nextLine();
for(int i = 0; i < employeeNames.length; i++) {
if(employeename.equals(employeeNames[i]) && employeecode.equals(employeeCodes[i])) {
doMatch = true;
break;
}
}
System.out.println(doMatch ? "Hello, " + employeename : "Unknown Employee Account!");
//hours per day
System.out.println("\n\n—————WORK HOURS PER DAY——————");
for(int i = 0; i < 5; i++) {
System.out.println(days[i] + "|Enter of Worked Hours: ");
pay[i] = scanner.nextInt();
sum += pay[i];
}
System.out.println("The total of 5 working days: " + sum);
//hours
System.out.println("\n\n—————WORKING HOURS—————" + "\nLess Than 8 Hours: " + types[0] +
"\nEqual To 8 Hours : " + types[1] + "\nGreater than or Equal To 8 Hours : " + types[2] + "\n");
System.out.print("Enter Working Hours: ");
int workinghours = scanner.nextInt();
System.out.print("Enter Subtrahend: ");
int subtrahend = scanner.nextInt();
System.out.print("Enter Multiplier: ");
int multiplier = scanner.nextInt();
System.out.println("\nOvertime Pay: " + (workinghours - subtrahend) * multiplier + "\n");
//format
System.out.println("—————WORKING HOURS FORMAT——————");
for(int i = 0; i < 5; i++) {
System.out.println("Day " + (i+1) + " |No. of Worked Hours: " + pay[i]);
}
System.out.println("\n");
}
}