The Single Responsibility PrincipleUncle Bobåä¸è²¬ä»»ååããã¼ãã»Cã»ãã¼ãã£ã³ã©ããããã¨ï¼è¯ããã¶ã¤ã³ã®åºæ¬ååããå¼·ãã¦ï¼ã¤é¸ã¶ã¨ããã°ãããã¯ãåä¸è²¬ä»»ååï¼SRPï¼Single Responsibility Principleï¼ãã§ããå¤æ´ããçç±ãåããã®ã¯éãããå¤æ´ããçç±ãéããã®ã¯åãããããã¯ã¤ã¾ããï¼ã¤ã®ãµãã·ã¹ãã ãã¢ã¸ã¥ã¼ã«ãã¯ã©ã¹ãé¢æ°ãªã©ã«ãå¤æ´ããçç±ã2ã¤ä»¥ä¸ããããã§ã¯ãããªããã¨ãããã¨ã§ãããã¨ãã°ï¼ã«ã¼ã«ãã¬ãã¼ãããã¼ã¿ãã¼ã¹ã«é¢ããã¡ã½ãããæã¤ã¯ã©ã¹ãããã¾ãã public class Employee { // ã«ã¼ã«ï¼çµ¦ä¸è¨ç® public Money calculatePay()... // ã¬ãã¼ãï¼ä½æ¥æéå ±åæ¸ public String reportHours()... // ãã¼
{{#tags}}- {{label}}
{{/tags}}