QUESTION 1
A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly. What design flaw is most likely the cause of these new bugs?
A. Inheritance
B. Tight coupling
C. Low cohesion
D. High cohesion
E. Loose coupling
F. Object immutability
Solution : B
plus imformation :
일반적으로 Tight 커플 링은 두 클래스가 종종 함께 변하는 것을 의미합니다.
즉, A가 B가 구현 된 방식보다 더 많이 알고 있으면 A와 B가 밀접하게 결합됩니다.
Ex : 스킨을 변경하려면 바디의 디자인도 변경해야합니다. 두 개가 서로 조인 되었기 때문입니다.
서로 밀착되었습니다. 밀 결합의 가장 좋은 예는 RMI (Remote Method Invocation)입니다.
두 클래스간에 강력한 상호 의존성이 있습니다. A클래스에 변경 사항이있는 경우 B 클래스의 결과에 반영됩니다.
'자격증 > OCJP_ExamB' 카테고리의 다른 글
QUESTION 6 (0) | 2018.07.09 |
---|---|
QUESTION 5 (0) | 2018.07.09 |
QUESTION 4 (0) | 2018.07.09 |
QUESTION 3 (0) | 2018.07.09 |
QUESTION 2 (0) | 2018.07.08 |
#IT #먹방 #전자기기 #일상
#개발 #일상