段階7完了しました。
This commit is contained in:
@@ -63,7 +63,10 @@ public class EmployeeData {
|
||||
return str;
|
||||
}
|
||||
|
||||
private static int empCount = 0;
|
||||
|
||||
public EmployeeData() {
|
||||
empCount++;
|
||||
}
|
||||
|
||||
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
|
||||
@@ -74,5 +77,10 @@ public class EmployeeData {
|
||||
this.setMailAddress(mailAddress);
|
||||
this.setPassword(password);
|
||||
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++ ) {
|
||||
System.out.println(employee[i]);
|
||||
}
|
||||
int i=EmployeeData.getEmpCount();
|
||||
System.out.println("現在の社員データ件数;"+ i + "件");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user