ComputerScience/Software Engineering
OOP - 3. Technique
jsdysw
2021. 9. 29. 12:21
728x90
1. Cohesion, Coupling
- component 동작들의 응집성이 높고 의존성이 적을수록 더 좋은 design이다.
- coupling이 많다는 것은 하나의 동작을 수행하는데 의존하는 component가 많아짐을 의미한다.
2. Interface and Implementation
- 사용자에게 what it does?인 interface는 공개하지만
- how it does?인 implementation은 숨긴다.
3. Selection of name
- short, pronounceable
- evocative
- avoid digits
4. Private
- class에서 data member를 private으로 설정하도록 권장
728x90
반응형