2日目 コミットしてなかった分
This commit is contained in:
@@ -10,7 +10,6 @@ public class EmployeeData {
|
||||
|
||||
static final String COMPANY_NAME = "Rhizome";
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getIdEmployee() + "\t" + getNmEmployee() + " " + getKnEmployee() + "\t" + getMailAddress()
|
||||
@@ -34,12 +33,17 @@ public class EmployeeData {
|
||||
nmEmployee = nmEmployee.strip();
|
||||
int nmNum = nmEmployee.length();
|
||||
|
||||
idEmployee = idEmployee.strip();
|
||||
int idNum = idEmployee.length();
|
||||
|
||||
if (nmNum == 0) {
|
||||
System.out.println("社員名が空のため設定できませんでした");
|
||||
|
||||
}
|
||||
if(nmNum>0){
|
||||
|
||||
if (idNum == 0) {
|
||||
System.out.println("社員IDが空のため設定できませんでした");
|
||||
}
|
||||
if (nmNum > 0 && idNum > 0) {
|
||||
|
||||
this.setIdEmployee(idEmployee);
|
||||
this.setNmEmployee(nmEmployee);
|
||||
@@ -48,6 +52,7 @@ public class EmployeeData {
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
empCount++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,8 +105,4 @@ public class EmployeeData {
|
||||
this.idDepartment = idDepartment;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -48,6 +48,9 @@ public class Main {
|
||||
|
||||
|
||||
for(int i=0;i<5;i++) {
|
||||
if(employee[i].getNmEmployee()==null) {
|
||||
continue;
|
||||
}
|
||||
System.out.println(employee[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user