Skip to content

ISRO Scientist/Engineer CSE 2020Information Systems and Software Engineering › Not yet assigned to a topic

ISRO Scientist/Engineer CSE 2020 PYQ: In a class definition with 10 methods, to make the class maximally cohesive, number of direct and indirect…

In a class definition with 10 methods, to make the class maximally cohesive, number of direct and indirect connections required among the methods are

  1. A
    90,0
  2. B
    45,0
    Correct answer
  3. C
    10,10
  4. D
    45,45

Answer

(B) $45,0$

Approach

Maximal cohesion means every method is directly connected to every other method, forming a complete graph on 10 vertices. Count the edges of this complete graph to get the number of direct connections; indirect connections are those not direct, which is zero.

Reviewed by ISRO IQ Editorial Team.