in IS&Software Engineering edited by
2,428 views
3 votes
3 votes

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. $90,0$
  2. $45,0$
  3. $10,10$
  4. $45,45$
in IS&Software Engineering edited by
by
2.4k views

1 Answer

1 vote
1 vote
To make the class maximally cohesive, every method should be related to every other method.

It is like a complete graph of 10 vertices. i.e.,

n(n-1)/2

10(9)/2=45,  and all these were direct connections

hence option b is the answer

4 Comments

In indirect connections, there won't be a node connected to any other node, so there is no relation b/w two modules.

Is that why there can't be Indirect cohesive classes?
0
0
no, I am thinking it as a complete graph with n nodes, in the complete graph there won't be any indirect connections, every node is connected directly with one another
0
0
Okay understood. Thanks

I think in your meaning of indirect was A→b→c so a to c is indirect connection, but every node is connected to each other than there is no indirect.
0
0
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true