2日目段階9完了しました

This commit is contained in:
2026-09-18 10:16:07 +09:00
parent 5f46aaec08
commit 8c1fba011a
2 changed files with 14 additions and 14 deletions

View File

@@ -68,7 +68,7 @@ public class EmployeeData extends BaseDate {
public EmployeeData() { public EmployeeData() {
empCount++; empCount++;
} }
//
public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password, public EmployeeData(String idEmployee, String nmEmployee, String knEmployee, String mailAddress, String password,
String idDepartment) { String idDepartment) {
idEmployee = idEmployee.trim(); idEmployee = idEmployee.trim();

View File

@@ -11,19 +11,19 @@ public class Main {
employee[3] = new EmployeeData("10003", "丸戸章介", "マルトショウスケ", "marusyo@hoge.jp", "ddd", "13"); employee[3] = new EmployeeData("10003", "丸戸章介", "マルトショウスケ", "marusyo@hoge.jp", "ddd", "13");
employee[4] = new EmployeeData("10004", "三宅武", "ミヤケタケシ", "miya@hoge.jp", "eee", "14"); employee[4] = new EmployeeData("10004", "三宅武", "ミヤケタケシ", "miya@hoge.jp", "eee", "14");
// for (int i=0; i<=4; i++ ) { for (int i=0; i<=4; i++ ) {
// System.out.println(employee[i]); System.out.println(employee[i]);
// } }
// int i=EmployeeData.getEmpCount(); // int i=EmployeeData.getEmpCount();
// System.out.println("現在の社員データ件数;"+ i + "件"); // System.out.println("現在の社員データ件数;"+ i + "件");
//
// System.out.println(employee[0].toCSV()); System.out.println(employee[0].toCSV());
// System.out.println(employee[0].getPrimaryKeyValue()); System.out.println(employee[0].getPrimaryKeyValue());
String str=""; String str = "";
while(!str.equals("0")){ while (!str.equals("0")) {
System.out.println("検索したい社員IDを入力してください(終了する場合は0)"); System.out.println("検索したい社員IDを入力してください(終了する場合は0)");
Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(System.in);
str = sc.nextLine(); str = sc.nextLine();
for (int i = 0; i <= 4; i++) { for (int i = 0; i <= 4; i++) {
boolean bo = employee[i].isMatchId(str); boolean bo = employee[i].isMatchId(str);
if (bo == true) { if (bo == true) {