the mood set of object-oriented software metrics
DESCRIPTION
The MOOD Set of Object-Oriented Software Metrics. Visibility. Is_visible(M,C) 1 iff class C may call method M and M is in another class – I.e. public 0 otherwise V(M) = sum of Is_visible for method M over all classes divided by number of other classes - PowerPoint PPT PresentationTRANSCRIPT
740f02measure15 1
The MOOD Set of Object-Oriented Software Metrics
740f02measure15 2
Visibility Is_visible(M,C)
– 1 iff class C may call method M and M is in another class – I.e. public
– 0 otherwise
V(M) = sum of Is_visible for method M over all classes divided by number of other classes– percentage of other classes that can call this method
740f02measure15 3
MHF definition
Summation over all methods in all classes of 1 minus the V(M) divided by the total number of methods
TC
iid
TC
i
CM
mim
CM
MVMHF
id
1
11
,(1
740f02measure15 4
Model for MHF?
What would be a good abstraction?
Is there a well-understood Empirical Relationship?
Scale Type?
740f02measure15 5
Inheritance Factor
Md(Ci) = number of methods declared in a class i
Mi(Ci) = number of methods inherited (and not overridden)
in a class iMa(Ci) = Md(Ci) + Mi(C i) = number of methods that can
be invoked in association with class i
TC
i ia
TC
i ii
CM
CMMIF
1
1
740f02measure15 6
Model for MIF?
What would be a good abstraction?
Is there a well-understood Empirical Relationship?
Scale Type?
740f02measure15 7
Coupling Factor
TCTC
ccclientisCF
TC
i
TC
j ji
2
1 1),(_
740f02measure15 8
Model for CF?
What would be a good abstraction?
Is there a well-understood Empirical Relationship?
Scale Type?
740f02measure15 9
Polymorphism FactorLet Mo(Ci) be the number of overriding methods in class i.
Let Mn(Ci) be the number of new methods in class i.
Let DC(Ci) be the number of descendants of class i.
TC
i iin
TC
i io
CDCCM
CMPF
1
1
740f02measure15 10
Model for PF?
What would be a good abstraction?
Is there a well-understood Empirical Relationship?
Scale Type?