5段階目(EmployeeDataにコンストラクタを作ろう)
This commit is contained in:
@@ -7,6 +7,22 @@ public class EmployeeData {
|
||||
private String password;
|
||||
private String idDepartment;
|
||||
|
||||
//コンストラクタ
|
||||
public EmployeeData() {
|
||||
|
||||
}
|
||||
|
||||
//引数ありコンストラクタ
|
||||
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee,
|
||||
String mailAddress, String password, String idDepartment) {
|
||||
this.setIdEmployee(idEmployee);
|
||||
this.setNmEmployee(nmEmployee);
|
||||
this.setKnEmployee(knEmployee);
|
||||
this.setMailAddress(mailAddress);
|
||||
this.setPassword(password);
|
||||
this.setIdDepartment(idDepartment);
|
||||
}
|
||||
|
||||
void showInfo() {
|
||||
System.out.println(this.idEmployee + "\t" + this.nmEmployee
|
||||
+ "\t" + this.knEmployee + "\t" + this.mailAddress
|
||||
|
||||
Reference in New Issue
Block a user