클래스가 관리하는 멤버변수가 많으면 어떤 점이 안좋을까요? #54
jimi567
started this conversation in
Clean Code
Replies: 2 comments
-
클래스가 관리하는 멤버 변수가 많을 경우 발생할 수 있는 문제점은 다음과 같습니다.
이러한 문제들을 해결하기 위해서는 클래스가 관리하는 멤버 변수의 수를 줄이고, 단일 책임 원칙을 준수하여 클래스를 작게 유지하는 것이 좋습니다. 또한 관련된 데이터를 그룹화하여 적절한 객체로 추출하고, 객체 간의 의존성을 최소화하여 클래스의 복잡성을 줄이는 것이 중요합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
"3개 이상의 인스턴스 변수를 가진 클래스를 쓰지 않는다." 라는 요구사항이 왜 있을까?
Beta Was this translation helpful? Give feedback.
All reactions