4段階目(EmployeeDataクラスの型を作ろう)
This commit is contained in:
15
em-oop/src/EmployeeData.java
Normal file
15
em-oop/src/EmployeeData.java
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
public class EmployeeData {
|
||||
String idEmployee;
|
||||
String nmEmployee;
|
||||
String knEmployee;
|
||||
String mailAddress;
|
||||
String password;
|
||||
String idDepartment;
|
||||
|
||||
void showInfo() {
|
||||
System.out.println(this.idEmployee + "\t" + this.nmEmployee
|
||||
+ "\t" + this.knEmployee + "\t" + this.mailAddress
|
||||
+ "\t" + this.password + "\t" + this.idDepartment);
|
||||
}
|
||||
}
|
||||
19
em-oop/src/Main.java
Normal file
19
em-oop/src/Main.java
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO 自動生成されたメソッド・スタブ
|
||||
EmployeeData employee = new EmployeeData();
|
||||
|
||||
employee.idEmployee = "10000";
|
||||
employee.nmEmployee = "山田龍也";
|
||||
employee.knEmployee = "ヤマダタツヤ";
|
||||
employee.mailAddress = "yamada@hoge.jp";
|
||||
employee.password = "aaa";
|
||||
employee.idDepartment = "10";
|
||||
|
||||
employee.showInfo();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user