ISRO | ISRO CS 2020 | Question 58
In a class definition with 10 methods, to make the class maximally cohesive, number of direct and indirect connections required among the methods are
(A) 90, 0
(B) 45, 0
(C) 10, 10
(D) 45, 45
Answer: (B)
Explanation: To make the class maximally cohesive, every method should be related to every other method, i.e.,
= nC2 = n*(n-1)/2 = 10*9/2 = 45
And, there is no connection between any other node directly, so = 0.
Option (B) is correct.
Quiz of this Question
Please Login to comment...