段階7完了しました。
This commit is contained in:
@@ -62,8 +62,11 @@ public class EmployeeData {
|
|||||||
+ "\t" + getPassword() + "\t" + getIdDepartment());
|
+ "\t" + getPassword() + "\t" + getIdDepartment());
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int empCount = 0;
|
||||||
|
|
||||||
public EmployeeData() {
|
public EmployeeData() {
|
||||||
|
empCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
|
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
|
||||||
@@ -74,5 +77,10 @@ public class EmployeeData {
|
|||||||
this.setMailAddress(mailAddress);
|
this.setMailAddress(mailAddress);
|
||||||
this.setPassword(password);
|
this.setPassword(password);
|
||||||
this.setIdDepartment(idDepartment);
|
this.setIdDepartment(idDepartment);
|
||||||
|
empCount++;
|
||||||
|
}
|
||||||
|
static int getEmpCount() {
|
||||||
|
int result = empCount;
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ public class Main {
|
|||||||
for (int i=0; i<=4; i++ ) {
|
for (int i=0; i<=4; i++ ) {
|
||||||
System.out.println(employee[i]);
|
System.out.println(employee[i]);
|
||||||
}
|
}
|
||||||
|
int i=EmployeeData.getEmpCount();
|
||||||
|
System.out.println("現在の社員データ件数;"+ i + "件");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user