段階6までです

This commit is contained in:
2026-09-15 15:46:38 +09:00
parent a52f78be66
commit 1b37712bc8
2 changed files with 17 additions and 10 deletions

View File

@@ -17,14 +17,15 @@ public class EmployeeData {
this.idDepartment = idDepartment; this.idDepartment = idDepartment;
} }
public void showInfo() { public void showInfo() {
System.out.println(this.idEmployee); System.out.println(this.idEmployee + "\t" + this.nmEmployee + "\t"+this.knEmployee + "\t" + this.mailAddress + "\t" +this.password + "\t"+this.idDepartment);
System.out.println(this.nmEmployee); // System.out.println(this.nmEmployee);
System.out.println(this.knEmployee); // System.out.println(this.knEmployee);
System.out.println(this.mailAddress); // System.out.println(this.mailAddress);
System.out.println(this.password); // System.out.println(this.password);
System.out.println(this.idDepartment); // System.out.println(this.idDepartment);
} }
// //
// public EmployeeData(String idEmployee) { // public EmployeeData(String idEmployee) {
// this.idEmployee = idEmployee; // this.idEmployee = idEmployee;

View File

@@ -1,11 +1,17 @@
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
//EmployeeData[] employee = new EmployeeData[5]; EmployeeData[] employee = new EmployeeData[5];
EmployeeData employee = new EmployeeData("10000", "山田龍也", "ヤマダタツヤ", "yamada@hoge.jp", "aaa", "10"); employee[0] = new EmployeeData("10000", "山田龍也", "ヤマダタツヤ", "yamada@hoge.jp", "aaa", "10");
employee[1] = new EmployeeData("10001", "高橋準", "タカハシジュン", "jtaka@hoge.jp", "bbb", "10");
employee[2] = new EmployeeData("10002", "麻枝史明", "マエダフミアキ", "fmak@hoge.jp", "ccc", "11");
employee[3] = new EmployeeData("10003", "丸戸章介", "マルトショウスケ", "marusyo@hoge.jp", "ddd", "12");
employee[4] = new EmployeeData("10004", "三宅武", "ミヤケタケシ", "miya@hoge.jp", "eee", "13");
employee.showInfo(); for(int i = 0; i < 5; i++) {
employee[i].showInfo();
} }
}
} }