2日目 段階7(余裕がある人向けも) 小澤
This commit is contained in:
@@ -6,6 +6,10 @@ public class EmployeeData {
|
||||
private String mailAddress;
|
||||
private String password;
|
||||
private String idDepartment;
|
||||
private static int empCount = 0;
|
||||
|
||||
static final String COMPANY_NAME = "Rhizome";
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@@ -13,7 +17,12 @@ public class EmployeeData {
|
||||
+ "\t" + getPassword() + "\t" + getIdDepartment();
|
||||
}
|
||||
|
||||
static int getEmpCount() {
|
||||
return empCount;
|
||||
}
|
||||
|
||||
public EmployeeData() {
|
||||
empCount++;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +34,7 @@ public class EmployeeData {
|
||||
this.setMailAddress(mailAddress);
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
empCount++;
|
||||
}
|
||||
|
||||
public String getIdEmployee() {
|
||||
@@ -75,4 +85,8 @@ public class EmployeeData {
|
||||
this.idDepartment = idDepartment;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -46,11 +46,16 @@ public class Main {
|
||||
employee[4].setIdDepartment("13");
|
||||
//
|
||||
|
||||
|
||||
for(int i=0;i<5;i++) {
|
||||
System.out.println(employee[i]);
|
||||
}
|
||||
|
||||
|
||||
System.out.println("現在の社員データ数"+EmployeeData.getEmpCount());
|
||||
|
||||
System.out.println(EmployeeData.COMPANY_NAME);
|
||||
|
||||
// System.out.println();
|
||||
// System.out.println(employee.nmEmployee);
|
||||
// System.out.println(employee.knEmployee);
|
||||
|
||||
Reference in New Issue
Block a user