diff --git a/em-oop/src/Day3Check1.java b/em-oop/src/Day3Check1.java index 6682a59..7d0af56 100644 --- a/em-oop/src/Day3Check1.java +++ b/em-oop/src/Day3Check1.java @@ -9,6 +9,6 @@ public class Day3Check1 { // Rectangle rectangle = new Rectangle(2); // rectangle.area(); - + employee.showinfo(); } } diff --git a/em-oop/src/EmployeeData.java b/em-oop/src/EmployeeData.java index 3cc0dac..4f540f8 100644 --- a/em-oop/src/EmployeeData.java +++ b/em-oop/src/EmployeeData.java @@ -1,20 +1,22 @@ public class EmployeeData { - public static void main(String args[]) { - String idEmployee; - String nmEmployee; - String knEmployee; - String mailAddress; - String password; - String idDepartment; - } - -// public EmployeeData() { -// this.idEmployee = ""; +// public static void main(String args[]) { + + String idEmployee ; + String nmEmployee ; + String knEmployee ; + String mailAddress ; + String password ; + String idDepartment ; + + +// public String Employee(String idEmployee) { +// this.idEmployee= idEmployee; // } public void showinfo() { - System.out.println(); +// this.idEmployee = idEmployee; + System.out.println(this.idEmployee + "\t" + this.nmEmployee+ "\t" + this.knEmployee + "\t"+ this.mailAddress+ "\t" + this.password + "\t"+ this.idDepartment ); } diff --git a/em-oop/src/Main.java b/em-oop/src/Main.java index 7ee8bfa..d528b2e 100644 --- a/em-oop/src/Main.java +++ b/em-oop/src/Main.java @@ -9,13 +9,23 @@ public class Main { String password = "aaa"; String idDepartment = "10"; + employee.idEmployee = "1000"; + employee.nmEmployee = "山田龍也"; + employee.knEmployee = "ヤマダタツヤ"; + employee.mailAddress ="yamada@hoge.jp"; + employee.password = "aaa"; + employee.idDepartment ="10"; + + + employee.showinfo(); + // System.out.println(employee); - System.out.println(idEmployee); - System.out.println(nmEmployee); - System.out.println(knEmployee); - System.out.println(mailAddress); - System.out.println(password); - System.out.println(idDepartment); +// System.out.println(idEmployee); +// System.out.println(nmEmployee); +// System.out.println(knEmployee); +// System.out.println(mailAddress); +// System.out.println(password); +// System.out.println(idDepartment); }