£µ¡¿£±£µ_Java¤Î½ÉÂê

public class Account {  // ¸ýºÂ(A)
   int account_id;      // ¸ýºÂID
   int balance;         // »Ä¹â
   int customer_id      // ¸ÜµÒID
}

public class Interest_account { // ÍøÂ©¸ýºÂ(IBA)
   int account_id;              // ¸ýºÂID
   int interest;                // ÍøÂ©Î¨
} 

public class Check_account extends Account { // ¾®ÀÚ¼ê¸ýºÂ(CA)
}

public class Deposit_account extends Account { // ÍÂ¶â¸ýºÂ(SA)
   Interest_account d = new Interest_account();
   int number; // Åö·î¤Î½èÍý¸ý¿ô
}

public class Club_account extends Account { // ¥¯¥é¥Ö¤Î¸ýºÂ(CCA)
   Interest_account c = new Interest_account();
   int deposit; // ½µ¤´¤È¤ÎÍÂ¶â³Û
}

public class Ordinary_check_account extends Check_account { // ÉáÄÌ¾®ÀÚ¼ê¸ýºÂ(RCA)
   int number; // Åö·î¤Î½èÍý²ó¿ô
}

public Check_account_with_interest extends Check_account { // Íø»ÒÉÕ¤­¾®ÀÚ¼ê¸ýºÂ(ICA)
   Interest_account p = new Interest_account();
}

