2日目 コミットしてなかった分
This commit is contained in:
@@ -7,20 +7,19 @@ public class EmployeeData {
|
||||
private String password;
|
||||
private String idDepartment;
|
||||
private static int empCount = 0;
|
||||
|
||||
|
||||
static final String COMPANY_NAME = "Rhizome";
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getIdEmployee() + "\t" + getNmEmployee() + " " + getKnEmployee() + "\t" + getMailAddress()
|
||||
+ "\t" + getPassword() + "\t" + getIdDepartment();
|
||||
}
|
||||
|
||||
|
||||
static int getEmpCount() {
|
||||
return empCount;
|
||||
}
|
||||
|
||||
|
||||
//getNmEmployee.strip();
|
||||
|
||||
public EmployeeData() {
|
||||
@@ -30,24 +29,30 @@ public class EmployeeData {
|
||||
|
||||
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
|
||||
String idDepartment) {
|
||||
|
||||
nmEmployee=nmEmployee.strip();
|
||||
|
||||
nmEmployee = nmEmployee.strip();
|
||||
int nmNum = nmEmployee.length();
|
||||
|
||||
if(nmNum==0) {
|
||||
|
||||
idEmployee = idEmployee.strip();
|
||||
int idNum = idEmployee.length();
|
||||
|
||||
if (nmNum == 0) {
|
||||
System.out.println("社員名が空のため設定できませんでした");
|
||||
|
||||
|
||||
}
|
||||
if(nmNum>0){
|
||||
|
||||
|
||||
this.setIdEmployee(idEmployee);
|
||||
this.setNmEmployee(nmEmployee);
|
||||
this.setKnEmployee(knEmployee);
|
||||
this.setMailAddress(mailAddress);
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
empCount++;
|
||||
if (idNum == 0) {
|
||||
System.out.println("社員IDが空のため設定できませんでした");
|
||||
}
|
||||
if (nmNum > 0 && idNum > 0) {
|
||||
|
||||
this.setIdEmployee(idEmployee);
|
||||
this.setNmEmployee(nmEmployee);
|
||||
this.setKnEmployee(knEmployee);
|
||||
this.setMailAddress(mailAddress);
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
empCount++;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +61,7 @@ public class EmployeeData {
|
||||
}
|
||||
|
||||
public void setIdEmployee(String idEmployee) {
|
||||
|
||||
|
||||
this.idEmployee = idEmployee;
|
||||
}
|
||||
|
||||
@@ -100,8 +105,4 @@ public class EmployeeData {
|
||||
this.idDepartment = idDepartment;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user