1日目_段階6
This commit is contained in:
@@ -9,6 +9,6 @@ public class Day3Check1 {
|
|||||||
|
|
||||||
// Rectangle rectangle = new Rectangle(2);
|
// Rectangle rectangle = new Rectangle(2);
|
||||||
// rectangle.area();
|
// rectangle.area();
|
||||||
employee.showinfo();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,28 @@ public class EmployeeData {
|
|||||||
String password ;
|
String password ;
|
||||||
String idDepartment ;
|
String idDepartment ;
|
||||||
|
|
||||||
|
public EmployeeData(String idEmployee,String nmEmployee,
|
||||||
|
String knEmployee,String mailAddress,String password
|
||||||
|
,String idDepartment) {
|
||||||
|
this.idEmployee = idEmployee;
|
||||||
|
this.nmEmployee = nmEmployee;
|
||||||
|
this.knEmployee = knEmployee;
|
||||||
|
this.mailAddress =mailAddress;
|
||||||
|
this.password = password;
|
||||||
|
this.idDepartment = idDepartment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// public String Employee(String idEmployee) {
|
// public String Employee(String idEmployee) {
|
||||||
// this.idEmployee= idEmployee;
|
// this.idEmployee= idEmployee;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
public EmployeeData() {
|
||||||
|
// TODO 自動生成されたコンストラクター・スタブ
|
||||||
|
}
|
||||||
|
|
||||||
public void showinfo() {
|
public void showinfo() {
|
||||||
// this.idEmployee = idEmployee;
|
// this.idEmployee = 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.idEmployee + "\t" + this.nmEmployee+ "\t" + this.knEmployee + "\t"+ this.mailAddress+ "\t" + this.password + "\t"+ this.idDepartment );
|
||||||
|
|||||||
@@ -1,35 +1,73 @@
|
|||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
EmployeeData employee = new EmployeeData() ;
|
// EmployeeData employee = new EmployeeData();
|
||||||
String idEmployee = "10000";
|
// String idEmployee = "10000";
|
||||||
String nmEmployee = "山田龍也";
|
// String nmEmployee = "山田龍也";
|
||||||
String knEmployee = "ヤマダタツヤ";
|
// String knEmployee = "ヤマダタツヤ";
|
||||||
String mailAddress = "yamada@hoge.jp";
|
// String mailAddress = "yamada@hoge.jp";
|
||||||
String password = "aaa";
|
// String password = "aaa";
|
||||||
String idDepartment = "10";
|
// String idDepartment = "10";
|
||||||
|
|
||||||
employee.idEmployee = "1000";
|
EmployeeData[] employees = new EmployeeData[5];
|
||||||
employee.nmEmployee = "山田龍也";
|
|
||||||
employee.knEmployee = "ヤマダタツヤ";
|
|
||||||
employee.mailAddress ="yamada@hoge.jp";
|
|
||||||
employee.password = "aaa";
|
|
||||||
employee.idDepartment ="10";
|
|
||||||
|
|
||||||
|
// employees[1] = new Employee;
|
||||||
|
|
||||||
employee.showinfo();
|
employees[0] = new EmployeeData();
|
||||||
|
employees[0].idEmployee = "1000"; //段階5の分に s[0] 足した
|
||||||
|
employees[0].nmEmployee = "山田龍也";
|
||||||
|
employees[0].knEmployee = "ヤマダタツヤ";
|
||||||
|
employees[0].mailAddress = "yamada@hoge.jp";
|
||||||
|
employees[0].password = "aaa";
|
||||||
|
employees[0].idDepartment = "10";
|
||||||
|
|
||||||
// System.out.println(employee);
|
////
|
||||||
// System.out.println(idEmployee);
|
employees[1] = new EmployeeData();
|
||||||
// System.out.println(nmEmployee);
|
employees[1].idEmployee = "10001";
|
||||||
// System.out.println(knEmployee);
|
employees[1].nmEmployee = "高橋準";
|
||||||
// System.out.println(mailAddress);
|
employees[1].knEmployee = "タカハシジュン";
|
||||||
// System.out.println(password);
|
employees[1].mailAddress = "jtaka@hoge.jp";
|
||||||
// System.out.println(idDepartment);
|
employees[1].password = "bbb";
|
||||||
|
employees[1].idDepartment = "10";
|
||||||
|
//
|
||||||
|
employees[2] = new EmployeeData();
|
||||||
|
employees[2].idEmployee = "10002";
|
||||||
|
employees[2].nmEmployee = "麻枝文明";
|
||||||
|
employees[2].knEmployee = "マエダフミアキ";
|
||||||
|
employees[2].mailAddress = "fmak@hoge.jp";
|
||||||
|
employees[2].password = "ccc";
|
||||||
|
employees[2].idDepartment = "11";
|
||||||
|
//
|
||||||
|
employees[3] = new EmployeeData();
|
||||||
|
employees[3].idEmployee = "10003";
|
||||||
|
employees[3].nmEmployee = "丸戸章介";
|
||||||
|
employees[3].knEmployee = "マルトショウスケ";
|
||||||
|
employees[3].mailAddress = "marusyo@hoge.jp";
|
||||||
|
employees[3].password = "ddd";
|
||||||
|
employees[3].idDepartment = "12";
|
||||||
|
//
|
||||||
|
employees[4] = new EmployeeData();
|
||||||
|
employees[4].idEmployee = "10004";
|
||||||
|
employees[4].nmEmployee = "三宅武";
|
||||||
|
employees[4].knEmployee = "ミヤケタケシ";
|
||||||
|
employees[4].mailAddress = "miya@hoge.jp";
|
||||||
|
employees[4].password = "eee";
|
||||||
|
employees[4].idDepartment = "13";
|
||||||
|
|
||||||
|
employees[0].showinfo();
|
||||||
|
employees[1].showinfo();
|
||||||
|
employees[2].showinfo();
|
||||||
|
employees[3].showinfo();
|
||||||
|
employees[4].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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user