سوال 28
حل تشریحی سوال شماره 28 زبان عمومی و تخصصی (انگلیسی)
کنکور ارشد مهندسی فناوری اطلاعات (IT) 1398
In object-oriented programming, if the methods of a class tend to be similar in many aspects, then the class is said to have high cohesion. In a highly cohesive system, code readability and reusability is increased, while complexity is kept manageable. Cohesion is increased if:
1- The functionalities embedded in a class, accessed through its methods, have much in common.
2- Methods carry out a small number of related activities, by avoiding coarse-grained or unrelated sets of data.
Advantages of high cohesion (or "strong cohesion") are:
1- Reduced module complexity (they are simpler, having fewer operations).
2- Increased system maintainability, because logical changes in the domain affect fewer modules.
3- Increased module reusability, because application developers will find the component they need more easily among the cohesive set of operations provided by the module.
28.
According to the passage, which of the following affects a class's cohesion?
1)
Unrelated activities in its methods
2)
Reusability of the system in which it resides
3)
Readability of its methods
4)
Complexity of the module in which it resides
پاسخ ها
0 پاسختا کنون پاسخی برای این سوال وارد نشده است،