段階7完了しました。

This commit is contained in:
2026-09-15 15:57:07 +09:00
parent f8295163ed
commit 4e4f518253
2 changed files with 10 additions and 0 deletions

View File

@@ -63,7 +63,10 @@ public class EmployeeData {
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;
} }
} }

View File

@@ -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 + "件");
} }
} }