Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

ISRO | ISRO CS 2020 | Question 58

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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

My Personal Notes arrow_drop_up
Last Updated : 09 Sep, 2020
Like Article
Save Article
Similar Reads