Slide 8
Slide 8 text
#ゆるWeb札幌
CAMC:Cohesion Among Methods of Classes
8
public class HighCAMC {
void method1(int a) { }
public void method2(int a, int b) { }
public void method3(int a, int b, int c) { }
}
CAMC =
{1, 1, 1}
3 × 1
= 1.0
=
3
3
public class LowCAMC {
public void method1(int i) { }
public void method2(double d, String S) { }
public void method3(char c) { }
}
CAMC =
(int, {double, String}, char)
3 × (int, double, String, char)
(int, int, int)
3 × int
=
{1, 2, 1}
3 × 4
= 0.3
=
12
4
=