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