Day1_7段階目
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
public class EmployeeData {
|
public class EmployeeData {
|
||||||
|
|
||||||
|
|
||||||
private String idEmployee;
|
private String idEmployee;
|
||||||
private String nmEmployee;
|
private String nmEmployee;
|
||||||
private String knEmployee;
|
private String knEmployee;
|
||||||
@@ -8,6 +9,8 @@ public class EmployeeData {
|
|||||||
private String password;
|
private String password;
|
||||||
private String idDepartment;
|
private String idDepartment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getIdEmployee() {
|
public String getIdEmployee() {
|
||||||
return idEmployee;
|
return idEmployee;
|
||||||
}
|
}
|
||||||
@@ -56,6 +59,8 @@ public class EmployeeData {
|
|||||||
this.idDepartment = idDepartment;
|
this.idDepartment = idDepartment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void showInfo() {
|
void showInfo() {
|
||||||
|
|
||||||
System.out.println(
|
System.out.println(
|
||||||
@@ -68,4 +73,9 @@ public class EmployeeData {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMatchID(String id) {
|
||||||
|
return this.idEmployee.equals(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ public class Main {
|
|||||||
Employees[0].setPassword("aaa");
|
Employees[0].setPassword("aaa");
|
||||||
Employees[0].setIdDepartment("10");
|
Employees[0].setIdDepartment("10");
|
||||||
|
|
||||||
|
System.out.println("10000を検索します");
|
||||||
|
System.out.println(Employees[0].isMatchID("10000"));
|
||||||
|
|
||||||
Employees[1].setIdEmployee("10001");
|
Employees[1].setIdEmployee("10001");
|
||||||
Employees[1].setNmEmployee("高橋準");
|
Employees[1].setNmEmployee("高橋準");
|
||||||
Employees[1].setKnEmployee("タカハシジュン");
|
Employees[1].setKnEmployee("タカハシジュン");
|
||||||
@@ -47,7 +50,9 @@ public class Main {
|
|||||||
Employees[4].setPassword("eee");
|
Employees[4].setPassword("eee");
|
||||||
Employees[4].setIdDepartment("13");
|
Employees[4].setIdDepartment("13");
|
||||||
|
|
||||||
Employees[0].showInfo();
|
|
||||||
|
|
||||||
|
// Employees[0].showInfo();
|
||||||
|
|
||||||
// System.out.println(Employees.idEmployee);
|
// System.out.println(Employees.idEmployee);
|
||||||
// System.out.println(Employees.nmEmployee);
|
// System.out.println(Employees.nmEmployee);
|
||||||
@@ -58,7 +63,7 @@ public class Main {
|
|||||||
|
|
||||||
// for (int i = 0; i < Employees.length; i++) {
|
// for (int i = 0; i < Employees.length; i++) {
|
||||||
// Employees[i].showInfo();
|
// Employees[i].showInfo();
|
||||||
|
//
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user