個人開発の修正です

This commit is contained in:
2026-09-24 16:53:41 +09:00
parent 83691c5691
commit 06dedc4519
2 changed files with 13 additions and 4 deletions

View File

@@ -36,6 +36,15 @@ public class EmployeeData extends BaseData {
} }
public void setNmEmployee(String nmEmployee) { public void setNmEmployee(String nmEmployee) {
// 2日目段階8
// String stripped = nmEmployee.strip();
// int length = stripped.length();
// if (nmEmployee == null) {
// System.out.println("社員名が空のため設定できませんでした");
// }
// if (length == 0) {
// System.out.println("社員名が空のため設定できませんでした");
// } else
this.nmEmployee = nmEmployee; this.nmEmployee = nmEmployee;
} }

View File

@@ -44,10 +44,10 @@ public class Main {
allData[9] = dept4; allData[9] = dept4;
allData[10] = dept5; allData[10] = dept5;
for (int i = 0; i < allData.length; i++) { // for (int i = 0; i < allData.length; i++) {
System.out.println(allData[i]); // System.out.println(allData[i]);
} // }
System.out.println("現在の社員データ件数"+ EmployeeData.getEmpCount()+ "件"); // System.out.println("現在の社員データ件数"+ EmployeeData.getEmpCount()+ "件");
for (int i = 0; i < allData.length; i++) { for (int i = 0; i < allData.length; i++) {