2日目 段階8 小澤
This commit is contained in:
@@ -20,6 +20,8 @@ public class EmployeeData {
|
||||
static int getEmpCount() {
|
||||
return empCount;
|
||||
}
|
||||
|
||||
//getNmEmployee.strip();
|
||||
|
||||
public EmployeeData() {
|
||||
empCount++;
|
||||
@@ -28,6 +30,17 @@ public class EmployeeData {
|
||||
|
||||
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
|
||||
String idDepartment) {
|
||||
|
||||
nmEmployee=nmEmployee.strip();
|
||||
int nmNum = nmEmployee.length();
|
||||
|
||||
if(nmNum==0) {
|
||||
System.out.println("社員名が空のため設定できませんでした");
|
||||
|
||||
}
|
||||
if(nmNum>0){
|
||||
|
||||
|
||||
this.setIdEmployee(idEmployee);
|
||||
this.setNmEmployee(nmEmployee);
|
||||
this.setKnEmployee(knEmployee);
|
||||
@@ -35,6 +48,7 @@ public class EmployeeData {
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
empCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public String getIdEmployee() {
|
||||
@@ -42,6 +56,7 @@ public class EmployeeData {
|
||||
}
|
||||
|
||||
public void setIdEmployee(String idEmployee) {
|
||||
|
||||
this.idEmployee = idEmployee;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user