4段階目(EmployeeDataをカプセル化しよう)

This commit is contained in:
s-sakiyama
2026-09-15 13:25:46 +09:00
parent 3d026db061
commit d98145e598
2 changed files with 85 additions and 48 deletions

View File

@@ -1,15 +1,64 @@
public class EmployeeData {
String idEmployee;
String nmEmployee;
String knEmployee;
String mailAddress;
String password;
String idDepartment;
private String idEmployee;
private String nmEmployee;
private String knEmployee;
private String mailAddress;
private String password;
private String idDepartment;
void showInfo() {
System.out.println(this.idEmployee + "\t" + this.nmEmployee
+ "\t" + this.knEmployee + "\t" + this.mailAddress
+ "\t" + this.password + "\t" + this.idDepartment);
}
public String getIdEmployee() {
return idEmployee;
}
public void setIdEmployee(String idEmployee) {
this.idEmployee = idEmployee;
}
public String getNmEmployee() {
return nmEmployee;
}
public void setNmEmployee(String nmEmployee) {
this.nmEmployee = nmEmployee;
}
public String getKnEmployee() {
return knEmployee;
}
public void setKnEmployee(String knEmployee) {
this.knEmployee = knEmployee;
}
public String getMailAddress() {
return mailAddress;
}
public void setMailAddress(String mailAddress) {
this.mailAddress = mailAddress;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getIdDepartment() {
return idDepartment;
}
public void setIdDepartment(String idDepartment) {
this.idDepartment = idDepartment;
}
}